Revert "Some of default. Better break this up."

This reverts commit 8833ab5bc6.
This commit is contained in:
Jason Felds
2013-07-18 17:43:31 -04:00
parent 6120a8a5e4
commit dc5d6a932d
59 changed files with 970 additions and 1548 deletions
@@ -1,42 +1,40 @@
local t = Def.ActorFrame {};
local function UpdateTime(self)
local c = self:GetChildren();
for pn in ivalues(PlayerNumber) do
local vStats = STATSMAN:GetCurStageStats():GetPlayerStageStats( pn );
local vTime;
local obj = self:GetChild( string.format("RemainingTime" .. PlayerNumberToString(pn) ) );
if vStats and obj then
vTime = vStats:GetLifeRemainingSeconds()
obj:settext( SecondsToMMSSMsMs( vTime ) );
end;
end;
end
if GAMESTATE:GetCurrentCourse() then
if GAMESTATE:GetCurrentCourse():GetCourseType() == "CourseType_Survival" then
-- RemainingTime
for pn in ivalues(PlayerNumber) do
local MetricsName = "RemainingTime" .. PlayerNumberToString(pn);
t[#t+1] = LoadActor( THEME:GetPathG( Var "LoadingScreen", "RemainingTime"), pn ) .. {
InitCommand=function(self)
self:player(pn);
self:name(MetricsName);
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
end;
};
end
for pn in ivalues(PlayerNumber) do
local MetricsName = "DeltaSeconds" .. PlayerNumberToString(pn);
t[#t+1] = LoadActor( THEME:GetPathG( Var "LoadingScreen", "DeltaSeconds"), pn ) .. {
InitCommand=function(self)
self:player(pn);
self:name(MetricsName);
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
end;
};
end
end;
end;
t.InitCommand=function(self)
self:SetUpdateFunction(UpdateTime);
end;
return t
local t = Def.ActorFrame {};
local function UpdateTime(self)
local c = self:GetChildren();
for pn in ivalues(PlayerNumber) do
local vStats = STATSMAN:GetCurStageStats():GetPlayerStageStats( pn );
local vTime;
local obj = self:GetChild( string.format("RemainingTime" .. PlayerNumberToString(pn) ) );
if vStats and obj then
vTime = vStats:GetLifeRemainingSeconds()
obj:settext( SecondsToMMSSMsMs( vTime ) );
end;
end;
end
if GAMESTATE:GetCurrentCourse() then
if GAMESTATE:GetCurrentCourse():GetCourseType() == "CourseType_Survival" then
-- RemainingTime
for pn in ivalues(PlayerNumber) do
local MetricsName = "RemainingTime" .. PlayerNumberToString(pn);
t[#t+1] = LoadActor( THEME:GetPathG( Var "LoadingScreen", "RemainingTime"), pn ) .. {
InitCommand=function(self)
self:player(pn);
self:name(MetricsName);
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
end;
};
end
for pn in ivalues(PlayerNumber) do
local MetricsName = "DeltaSeconds" .. PlayerNumberToString(pn);
t[#t+1] = LoadActor( THEME:GetPathG( Var "LoadingScreen", "DeltaSeconds"), pn ) .. {
InitCommand=function(self)
self:player(pn);
self:name(MetricsName);
ActorUtil.LoadAllCommandsAndSetXY(self,Var "LoadingScreen");
end;
};
end
end;
end;
t.InitCommand=cmd(SetUpdateFunction,UpdateTime);
return t