Files
itgmania212121/Themes/_themekit-piu/BGAnimations/ScreenGameplay overlay/default.lua
T

44 lines
942 B
Lua
Raw Normal View History

2011-04-29 14:58:59 -04:00
--a simple life display...
local function LifeDisplay(pn)
local function update(self)
--local this = self:GetChildren()
local lifemeter = SCREENMAN:GetTopScreen():GetLifeMeter(pn)
--ºvº
local life = lifemeter:GetLife()
life = clamp(life,0,1)
self:GetChild("LifeText"):settextf("Life: %.2f%%", life*100)
end
return Def.ActorFrame {
2013-07-03 18:38:57 -04:00
InitCommand=function(self)
self:player(pn);
self:SetUpdateFunction(update);
2011-04-29 14:58:59 -04:00
LoadFont("_arial black 20px")..{
--Text="100%";
Name="LifeText";
};
};
end
return Def.ActorFrame {
LoadFont("_impact 50px")..{
2013-07-03 18:38:57 -04:00
InitCommand=function(self)
self:CenterX();
self:FromTop(30);
2011-04-29 14:58:59 -04:00
Text=string.format("%02i", STATSMAN:GetStagesPlayed()+1);
};
2013-07-03 18:38:57 -04:00
LifeDisplay(PLAYER_1)..{
InitCommand=function(self)
self:FromCenterX(-160);
self:FromTop(20);
end;
};
LifeDisplay(PLAYER_2)..{
InitCommand=function(self)
self:FromCenterX(160);
self:FromTop(20);
end;
};
2011-04-07 16:42:16 -07:00
}