WIP: new-cbs #117
3 changed files with 12 additions and 0 deletions
|
@ -0,0 +1,7 @@
|
||||||
|
local FighterAbstract = Object:extend()
|
||||||
|
|
||||||
|
function FighterAbstract:initAbstract()
|
||||||
|
self.abstract = self:getAbstract()
|
||||||
|
end
|
||||||
|
|
||||||
|
return FighterAbstract
|
|
@ -20,6 +20,10 @@ function Player:new(world, x, y, z, id)
|
||||||
self:initTeam()
|
self:initTeam()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Player:getAbstract()
|
||||||
|
return game.characters.list[game.characters:getActiveCharacter()]
|
||||||
|
end
|
||||||
|
|
||||||
function Player:updateStart(dt)
|
function Player:updateStart(dt)
|
||||||
self:applyInputs()
|
self:applyInputs()
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,6 +31,7 @@ end
|
||||||
|
|
||||||
function SpritedPlayer:updateCurrentCharset()
|
function SpritedPlayer:updateCurrentCharset()
|
||||||
self.charName = game.characters:getActiveCharacter()
|
self.charName = game.characters:getActiveCharacter()
|
||||||
|
self:initAbstract()
|
||||||
self:changeSprite(self.charName)
|
self:changeSprite(self.charName)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue