当前位置: 首页>>代码示例>>C++>>正文


C++ MOAILuaState::GetValue方法代码示例

本文整理汇总了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;
}
开发者ID:Inzaghi2012,项目名称:moai-dev,代码行数:33,代码来源:MOAIFmodEventMgr.cpp

示例2: _unloadPendingUnloads

int MOAIFmodEventMgr::_unloadPendingUnloads ( lua_State* L ) {
    MOAILuaState state ( L );

    bool bBlockOnUnload = state.GetValue ( 1, false );
    FMODDesigner::tEventManager.UnloadPendingUnloads( bBlockOnUnload );
     
    return 0;
}
开发者ID:Inzaghi2012,项目名称:moai-dev,代码行数:8,代码来源:MOAIFmodEventMgr.cpp

示例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;
}
开发者ID:Inzaghi2012,项目名称:moai-dev,代码行数:18,代码来源:MOAIFmodEventMgr.cpp

示例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;
}
开发者ID:Inzaghi2012,项目名称:moai-dev,代码行数:18,代码来源:MOAIFmodEventMgr.cpp


注:本文中的MOAILuaState::GetValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。