convert to Lua

This doesn't actually need to be two files anymore.  Previously, XML
forced us to split actors apart at a finer level than was natural.  This could
be merged into a single file easily now, but I've left it as two for now for
demonstration and testing purposes.
This commit is contained in:
Glenn Maynard
2006-10-15 05:06:31 +00:00
parent b0e5b201e3
commit 6a8fb25435
2 changed files with 35 additions and 0 deletions
@@ -0,0 +1,10 @@
return Def.ActorFrame {
children = {
LoadActor("life graph")(PLAYER_1) .. {
InitCommand = cmd(x,SCREEN_LEFT+96;y,SCREEN_CENTER_Y+91),
},
LoadActor("life graph")(PLAYER_2) .. {
InitCommand = cmd(x,SCREEN_LEFT-96;y,SCREEN_CENTER_Y+91),
},
}
}
@@ -0,0 +1,25 @@
local Player = ...
assert( Player );
local t = Def.ActorFrame {
children = {
Def.GraphDisplay {
OnCommand=function(self)
local Stats = STATSMAN:GetCurStageStats();
self:LoadFromStats( Stats, Stats:GetPlayerStageStats(Player) )
end,
-- Input = { Name="Player" },
Texture = Def.Layer {
File="LifeGraph p1",
InitCommand=cmd(ztest,1;diffusealpha,0),
OnCommand=cmd(linear,0.5;diffusealpha,1),
OffCommand=cmd(linear,0.5;diffusealpha,0),
},
Line = Def.Layer { InitCommand=cmd(hidden,1) },
Body = Def.Layer { InitCommand=cmd(zwrite,1;blend,"BlendMode_NoEffect") },
SongBoundary = Def.Actor { InitCommand=cmd(hidden,1) },
Barely = Def.Actor { InitCommand=cmd(hidden,1) },
}
}
}
return t