improvement: better handling of statusbar callback
This commit is contained in:
parent
db9319fc90
commit
4bf4fdb541
2 changed files with 14 additions and 6 deletions
|
@ -110,14 +110,12 @@ function HeroFighter:goBackToMenu()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- LIFE functions
|
-- LIFE functions
|
||||||
function HeroFighter:setHP(value, relative)
|
function HeroFighter:updatePP()
|
||||||
HeroFighter.super.setHP(self, value, relative)
|
self.statusbar:updatePP()
|
||||||
self.statusbar:updateHP()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroFighter:setPP(value, relative)
|
function HeroFighter:updateHP()
|
||||||
HeroFighter.super.setPP(self, value, relative)
|
self.statusbar:updateHP()
|
||||||
self.statusbar:updatePP()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- VOICE SYSTEM
|
-- VOICE SYSTEM
|
||||||
|
|
|
@ -31,10 +31,12 @@ function FighterParent:setHP(value, relative)
|
||||||
end
|
end
|
||||||
self.abstract:setHP(value, relative)
|
self.abstract:setHP(value, relative)
|
||||||
self.actor:setDamageNumber(relativeNumber)
|
self.actor:setDamageNumber(relativeNumber)
|
||||||
|
self:updateHP()
|
||||||
end
|
end
|
||||||
|
|
||||||
function FighterParent:setPP(value, relative)
|
function FighterParent:setPP(value, relative)
|
||||||
self.abstract:setPP(value, relative)
|
self.abstract:setPP(value, relative)
|
||||||
|
self:updatePP()
|
||||||
end
|
end
|
||||||
|
|
||||||
function FighterParent:applyDeath()
|
function FighterParent:applyDeath()
|
||||||
|
@ -48,6 +50,14 @@ function FighterParent:die()
|
||||||
self.actor:die()
|
self.actor:die()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function FighterParent:updatePP()
|
||||||
|
-- Fonction vide
|
||||||
|
end
|
||||||
|
|
||||||
|
function FighterParent:updateHP()
|
||||||
|
-- Fonction vide
|
||||||
|
end
|
||||||
|
|
||||||
function FighterParent:sendDamage(target, value, accuracy, isSpecial, isAerial)
|
function FighterParent:sendDamage(target, value, accuracy, isSpecial, isAerial)
|
||||||
local stats = self:getStats()
|
local stats = self:getStats()
|
||||||
local value = value / 10
|
local value = value / 10
|
||||||
|
|
Loading…
Reference in a new issue