doors worxlove .

This commit is contained in:
0x81c 2015-03-15 07:08:35 -04:00
parent 7fcbd9e5da
commit 85dd66b1e4
8 changed files with 105 additions and 24 deletions

View file

@ -6,15 +6,10 @@ function Player:initialize(x, y, activeColors)
Entity.initialize(self, {
x = x,
y = y,
sizeX = 1,
sizeY = 1,
color = "white",
collision = "none", --player can't push other player
sprite = playerSprite
})
self.red, self.green, self.blue = Color:new("red"), Color:new("green"), Color:new("blue")
self.activeColors = activeColors or {"red", "green", "blue"}
end
@ -32,7 +27,7 @@ end
function Player:draw()
for _, color in ipairs(self.activeColors) do
love.graphics.setColor(self[color]:set())
love.graphics.setColor(gColor[color]:set())
local p = self:getDrawPos()
love.graphics.draw(self.sprite, p.x, p.y, 0, drawScale, drawScale)
end