convert to Lua; this one creates several actors cleanly, and uses upvalues

This commit is contained in:
Glenn Maynard
2006-10-15 08:03:18 +00:00
parent c3eccabd98
commit 3c2d96054d
@@ -0,0 +1,16 @@
local stages = { }
for _, s in ipairs(Stage) do
if GAMESTATE:IsStagePossible(s) then
local t = LoadActor("_stage " .. s)() .. {
InitCommand = cmd(playcommand,"Update"),
CurrentSongChangedMessageCommand=cmd(playcommand,"Update"),
UpdateCommand=cmd(hidden,GAMESTATE:GetCurrentStage() == s and 0 or 1)
}
table.insert( stages, t )
end
end
return Def.ActorFrame {
children = stages
}