fixed
This commit is contained in:
parent
b4905845e6
commit
d5a60336f5
3 changed files with 28 additions and 13 deletions
16
player.lua
16
player.lua
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue