28 lines
469 B
Lua
28 lines
469 B
Lua
require "entity"
|
|
|
|
Player = class("Player", Entity)
|
|
|
|
function Player:initialize(x, y, color)
|
|
|
|
Entity.initialize(self, {
|
|
x = x,
|
|
y = y,
|
|
sizeX = 3,
|
|
sizeY = 3,
|
|
color = color,
|
|
collision = "none", --player can't push other player
|
|
sprite = playerSprite
|
|
})
|
|
|
|
end
|
|
|
|
function Player:update()
|
|
|
|
end
|
|
|
|
function Player:draw()
|
|
love.graphics.setColor(self.color:set())
|
|
local p = self:getDrawPos()
|
|
love.graphics.draw(self.sprite, p.x, p.y, 0, drawScale, drawScale)
|
|
end
|
|
|