[LifeMeterBattery] Fixed various issues (lives not fully disappearing on fail, P2 lose life animation having the wrong x zoom, hide the lives number if it falls below 0).

This commit is contained in:
AJ Kelly
2011-12-12 22:13:32 -06:00
parent 058f03e495
commit c8e99cc18b
4 changed files with 15 additions and 7 deletions
@@ -3,14 +3,18 @@ local blinkTime = 1.2
local t = Def.ActorFrame{
LoadActor("_lives")..{
-- xxx: assumes course is 4lives
-- xxx: assumes course is 4lives (or more)
InitCommand=cmd(pause;setstate,3);
LifeChangedMessageCommand=function(self,param)
if param.Player == player then
if param.LivesLeft <= 4 then
if param.LivesLeft == 0 then
self:visible(false)
elseif param.LivesLeft <= 4 then
self:setstate( math.max(param.LivesLeft-1,0) )
self:visible(true)
else
self:setstate(3)
self:visible(true)
end
end
end;