本文整理汇总了C++中MOAILuaState::GetValue方法的典型用法代码示例。如果您正苦于以下问题:C++ MOAILuaState::GetValue方法的具体用法?C++ MOAILuaState::GetValue怎么用?C++ MOAILuaState::GetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MOAILuaState
的用法示例。
在下文中一共展示了MOAILuaState::GetValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: state
int MOAIFmodEventMgr::_playEvent2D ( lua_State* L ) {
MOAILuaState state ( L );
cc8* eventName = state.GetValue < cc8* > ( 1, "" );
if ( eventName[0] != '\0' ) {
const FMODDesigner::Event* pEvent = MOAIFmodEventMgr::Get().GetEvent( eventName );
if ( !pEvent )
{
FMODDesigner::Event actualEvent = FMODDesigner::Event( STLString( eventName ) );
MOAIFmodEventMgr::Get().AddEvent( eventName, actualEvent );
pEvent = MOAIFmodEventMgr::Get().GetEvent( eventName );
}
if ( pEvent->IsValid() ) {
bool bLoop = state.GetValue( 2, false );
// Try to play the sound
FMODDesigner::EventHandle hEventHandle = FMODDesigner::tEventManager.PlayEvent2D( *pEvent, bLoop );
// Create a MOAI Event Instance and push it out
MOAIFmodEventInstance* pEventInstance = new MOAIFmodEventInstance();
pEventInstance->SetEventInstance( hEventHandle );
pEventInstance->PushLuaUserdata ( state );
return 1;
}
}
return 0;
}
示例2: _unloadPendingUnloads
int MOAIFmodEventMgr::_unloadPendingUnloads ( lua_State* L ) {
MOAILuaState state ( L );
bool bBlockOnUnload = state.GetValue ( 1, false );
FMODDesigner::tEventManager.UnloadPendingUnloads( bBlockOnUnload );
return 0;
}
示例3: _loadGroup
int MOAIFmodEventMgr::_loadGroup ( lua_State* L ) {
MOAILuaState state ( L );
cc8* groupName = state.GetValue < cc8* > ( 1, "" );
if ( groupName[0] != '\0' )
{
bool bPersistent = state.GetValue ( 2, false );
bool bBlockOnLoad = state.GetValue ( 3, false );
bool bLoaded = FMODDesigner::tEventManager.LoadGroup ( STLString( groupName ), bPersistent, bBlockOnLoad );
lua_pushboolean ( L, bLoaded );
return 1;
}
return 0;
}
示例4: _unloadGroup
int MOAIFmodEventMgr::_unloadGroup ( lua_State* L ) {
MOAILuaState state ( L );
cc8* groupName = state.GetValue < cc8* > ( 1, "" );
if ( groupName[0] != '\0' )
{
bool bUnloadImmediately = state.GetValue ( 2, false );
bool bUnloaded = FMODDesigner::tEventManager.UnloadGroup ( STLString( groupName ), bUnloadImmediately );
lua_pushboolean ( L, bUnloaded );
return 1;
}
return 0;
}