boxes n walls n movement etcgit status

This commit is contained in:
0x81c 2015-03-12 03:04:09 -04:00
parent 9763040c99
commit 2772ec2563
10 changed files with 318 additions and 45 deletions

View file

@ -10,12 +10,10 @@ function Player:initialize(x, y, color)
sizeX = 3,
sizeY = 3,
color = color,
collision = "none" --player can't push other player
collision = "none", --player can't push other player
sprite = playerSprite
})
self.sprite = playerSprite
print("i exist!!")
end
function Player:update()
@ -28,14 +26,3 @@ function Player:draw()
love.graphics.draw(self.sprite, p.x, p.y, 0, drawScale, drawScale)
end
function Player:move(direction)
if direction == "up" then
self.gridY = self.gridY - 1
elseif direction == "down" then
self.gridY = self.gridY + 1
elseif direction == "left" then
self.gridX = self.gridX - 1
elseif direction == "right" then
self.gridX = self.gridX + 1
end
end