/zoeplat

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

« back to all changes in this revision

Viewing changes to sprite.lua

  • Committer: Josh C
  • Date: 2013-04-10 23:47:59 UTC
  • Revision ID: josh@9ix.org-20130410234759-nrzne3xed1puy1v2
put sprite and player in their own files

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
end
36
36
 
37
37
-- directional physics
38
 
function Sprite:doPhysics(dir, elapsed)
 
38
function Sprite:doPhysics(self, dir, elapsed)
39
39
   local vel = self.velocity
40
40
   local acc = self.acceleration
41
41
   local drag = self.drag
89
89
   -- TODO: take map position into account
90
90
   if self[dir] > edge then self[dir] = edge end
91
91
end
92
 
 
93
 
 
94
 
 
 
 
b'\\ No newline at end of file'