use LuaThreadVariable

This commit is contained in:
Glenn Maynard
2006-11-02 06:12:48 +00:00
parent dab10ec033
commit 083c20497c
2 changed files with 14 additions and 5 deletions
+2 -5
View File
@@ -39,12 +39,9 @@ void ScreenGameplayLesson::Init()
int i = s - vs.begin();
AutoActor &aa = m_vPages[i];
LUA->SetGlobal( "PageIndex", i );
LUA->SetGlobal( "NumPages", (int)vs.size() );
LuaThreadVariable iIndex( "PageIndex", LuaReference::Create(i) );
LuaThreadVariable iPages( "NumPages", LuaReference::Create( (int)vs.size() ) );
aa.Load( *s );
LUA->UnsetGlobal( "PageIndex" );
LUA->UnsetGlobal( "NumPages" );
aa->SetDrawOrder( DRAW_ORDER_OVERLAY+1 );