Fix lives.

This commit is contained in:
Jonathan Payne
2012-12-28 19:01:40 -08:00
parent b952a31272
commit 7ea1b21bb3
@@ -7,44 +7,7 @@ local LifeMeter, MaxLives, CurLives;
local LifeRatio;
local t = Def.ActorFrame {
Def.Quad {
Name="LifeFill";
InitCommand=cmd(zoomto,barWidth,barHeight);
--OnCommand=cmd(diffuseramp;effectcolor2,PlayerColor(player);effectcolor1,ColorMidTone(PlayerColor(player));
-- effectclock,'beatnooffset';effectperiod,1);
};
InitCommand=function(self)
--c = self:GetChildren();
end;
BeginCommand=function(self,param)
local screen = SCREENMAN:GetTopScreen() or nil;
if screen ~= nil then
LifeMeter = screen:GetLifeMeter(player);
MaxLives = LifeMeter:GetTotalLives();
CurLives = LifeMeter:GetLivesLeft();
MESSAGEMAN:Broadcast("SystemMessage",
{ Message = "(" .. MaxLives .. ", " .. CurLives ")", NoAnimate = true });
else
MESSAGEMAN:Broadcast("SystemMessage", { Message = "WE DONE FUCKED UP"});
end
end;
LifeChangedMessageCommand=function(self,param)
if param.Player == player then
LifeRatio = CurLives / MaxLives;
end
end;
StartCommand=function(self,param)
if param.Player == player then
LifeRatio = CurLives / MaxLives;
end
end;
FinishCommand=function(self,param)
if param.Player == player then
LifeRatio = CurLives / MaxLives;
end
end;
--[[ LoadActor("_lives")..{
LoadActor("_lives")..{
InitCommand=cmd(pause;horizalign,left;x,-(barWidth/2));
BeginCommand=function(self,param)
local screen = SCREENMAN:GetTopScreen();
@@ -74,8 +37,7 @@ local t = Def.ActorFrame {
end
end;
FinishCommand=cmd(playcommand,"Start");
}; ]]
};
};
return t;