/spacey

To get this branch, use:
bzr branch http://9ix.org/bzr/spacey

« back to all changes in this revision

Viewing changes to cursor.lua

  • Committer: Josh C
  • Date: 2013-05-04 22:53:27 UTC
  • Revision ID: josh@9ix.org-20130504225327-dsc1gi3ri96h50s2
trying some movement styles.  derivatives on crystal quest movement.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Cursor = Tile:extend {
2
 
   image = 'data/cursor.png',
3
 
   onUpdate = function(self)
4
 
                 if the.keys:justPressed('t') then
5
 
                    self.image = 'data/cursor-target.png'
6
 
                 end
7
 
                 if the.keys:justPressed('c') then
8
 
                    self.image = 'data/cursor.png'
9
 
                 end
10
 
 
11
 
              end,
12
 
   onEndFrame = function(self)
13
 
                   self.x = love.mouse.getX() + 8 + the.player.x - the.app.width / 2
14
 
                   self.y = love.mouse.getY() + 8 + the.player.y - the.app.height / 2
15
 
                end
16
 
}
 
 
b'\\ No newline at end of file'