/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-11 00:15:03 UTC
  • Revision ID: josh@9ix.org-20130411001503-u3hxmtsjcw9i3lo7
actually make separate player/sprite work.  clean up some code that 
assumes debug mode

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
      assert(drag, 'active sprite has no drag property')
51
51
      assert(minVel, 'active sprite has no minVelocity property')
52
52
      assert(maxVel, 'active sprite has no maxVelocity property')
53
 
      assert(dir=='x' or dir=='y' or dir=='rotation', 'direction should be x, y, or rotation')
 
53
      assert(__.include({'x','y','rotation'}, dir), 'direction should be x, y, or rotation')
54
54
   end
55
55
 
56
56
   vel.x = vel.x or 0
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'