tommyroyall

self:move_right(amount) of player's class constructor.

Nov 28th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.21 KB | None | 0 0
  1.     function self:move_right(amount) -- Move the player right said amount. Amount must be an integer. No return.
  2.         for i=0,tonumber(amount) do
  3.             if x<const.WIDTH then
  4.                 x=x+1
  5.             else
  6.                 break;
  7.             end
  8.         end
  9.     end
Advertisement
Add Comment
Please, Sign In to add comment