Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Object = {
- xPos = 0,
- yPos = 0,
- xVel = 0,
- yVel = 0
- }
- function Object:new(xPos, yPos, xVel, yVel)
- local class = {xPos = xPos, yPos = yPos, xVel = xVel, yVel = yVel}
- setmetatable(class, self)
- self.__index = self
- return class
- end
- function Object:move()
- xPos = xPos + xVel
- yPos = yPos + yVel
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement