Fix lives.
This commit is contained in:
@@ -7,44 +7,7 @@ local LifeMeter, MaxLives, CurLives;
|
|||||||
local LifeRatio;
|
local LifeRatio;
|
||||||
|
|
||||||
local t = Def.ActorFrame {
|
local t = Def.ActorFrame {
|
||||||
Def.Quad {
|
LoadActor("_lives")..{
|
||||||
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")..{
|
|
||||||
InitCommand=cmd(pause;horizalign,left;x,-(barWidth/2));
|
InitCommand=cmd(pause;horizalign,left;x,-(barWidth/2));
|
||||||
BeginCommand=function(self,param)
|
BeginCommand=function(self,param)
|
||||||
local screen = SCREENMAN:GetTopScreen();
|
local screen = SCREENMAN:GetTopScreen();
|
||||||
@@ -74,8 +37,7 @@ local t = Def.ActorFrame {
|
|||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
FinishCommand=cmd(playcommand,"Start");
|
FinishCommand=cmd(playcommand,"Start");
|
||||||
}; ]]
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
Reference in New Issue
Block a user