This commit is contained in:
0x81c 2015-03-11 21:08:15 -04:00
parent b4905845e6
commit d5a60336f5
3 changed files with 28 additions and 13 deletions

View file

@ -1,23 +1,17 @@
require "entity"
Player = class("Player")
Player = class("Player", Entity)
function Player:initialize(x, y, color)
local entityTable = {
Entity.initialize(self, {
x = x,
y = y,
sizeX = 1,
sizeY = 1,
sizeX = 3,
sizeY = 3,
color = color,
collision = "none" --player can't push other player
}
Entity.initialize(self, entityTable)
--need to probably get rid of middleclass
--and roll yr own for default method inheritance
self.getDrawPos = Entity.getDrawPos
self.getGridPos = Entity.getGridPos
})
self.sprite = playerSprite
end