WIP: new-cbs #117

Closed
kazhnuz wants to merge 23 commits from new-cbs into master
3 changed files with 12 additions and 0 deletions
Showing only changes of commit 303bee4e37 - Show all commits

View file

@ -0,0 +1,7 @@
local FighterAbstract = Object:extend()
function FighterAbstract:initAbstract()
self.abstract = self:getAbstract()
end
return FighterAbstract

View file

@ -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

View file

@ -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