/ld26

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

« back to all changes in this revision

Viewing changes to player.lua

  • Committer: Josh C
  • Date: 2013-04-27 19:17:32 UTC
  • Revision ID: josh@9ix.org-20130427191732-b04lkepq9cz8e1n7
player min/maxY on a level

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
                     else
30
30
                        self.velocity.x = 0
31
31
                     end
32
 
                  end
 
32
                  end,
 
33
   onEndFrame = function(self)
 
34
                   if self.y < self.minY then
 
35
                      self.y = self.minY
 
36
                   end
 
37
                   if self.y > self.maxY then
 
38
                      self.y = self.maxY
 
39
                   end
 
40
                end
33
41
}
 
 
b'\\ No newline at end of file'