Files
itgmania212121/Themes/default/BGAnimations/ScreenGameplay out.lua
T

50 lines
1.5 KiB
Lua
Raw Normal View History

2013-07-18 17:42:49 -04:00
local raveChildren
local bg = Def.ActorFrame{
Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("0,0,0,0"));
2013-07-18 18:02:01 -04:00
OnCommand=cmd(linear,5;diffusealpha,1);
2013-07-18 17:42:49 -04:00
};
Def.ActorFrame{
Name="RaveMessages";
InitCommand=function(self)
raveChildren = self:GetChildren()
self:visible(GAMESTATE:GetPlayMode() == 'PlayMode_Rave')
raveChildren.P1Win:visible(false)
raveChildren.P2Win:visible(false)
raveChildren.Draw:visible(false)
end;
OffCommand=function(self)
local p1Win = GAMESTATE:IsWinner(PLAYER_1)
local p2Win = GAMESTATE:IsWinner(PLAYER_2)
if GAMESTATE:IsWinner(PLAYER_1) then
raveChildren.P1Win:visible(true)
elseif GAMESTATE:IsWinner(PLAYER_2) then
raveChildren.P2Win:visible(true)
else
raveChildren.Draw:visible(true)
end
end;
LoadActor(THEME:GetPathG("_rave result","P1"))..{
Name="P1Win";
2013-07-18 18:02:01 -04:00
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;);
OnCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0);
2013-07-18 17:42:49 -04:00
};
LoadActor(THEME:GetPathG("_rave result","P2"))..{
Name="P2Win";
2013-07-18 18:02:01 -04:00
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;);
OnCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0);
2013-07-18 17:42:49 -04:00
};
LoadActor(THEME:GetPathG("_rave result","draw"))..{
Name="Draw";
2013-07-18 18:02:01 -04:00
InitCommand=cmd(Center;cropbottom,1;fadebottom,1;);
OnCommand=cmd(sleep,2;linear,0.5;cropbottom,0;fadebottom,0;sleep,1.75;linear,0.25;diffusealpha,0);
2013-07-18 17:42:49 -04:00
};
};
};
return bg