本文整理汇总了C++中MOAILuaStateHandle类的典型用法代码示例。如果您正苦于以下问题:C++ MOAILuaStateHandle类的具体用法?C++ MOAILuaStateHandle怎么用?C++ MOAILuaStateHandle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MOAILuaStateHandle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SendResumeEvent
//----------------------------------------------------------------//
void MOAISim::SendResumeEvent () {
MOAILuaStateHandle state = MOAILuaRuntime::Get ().State ();
if ( this->PushListener ( EVENT_RESUME, state )) {
state.DebugCall ( 0, 0 );
}
}
示例2: SetValue
//----------------------------------------------------------------//
void MOAIEnvironment::SetValue ( cc8* key ) {
MOAILuaStateHandle state = MOAILuaRuntime::Get ().State ();
this->PushLuaClassTable ( state );
state.ClearField ( -1, key );
state.Pop ( 1 );
}
示例3: SetConfigurationName
//----------------------------------------------------------------//
void MOAIInputMgr::SetConfigurationName ( cc8* name ) {
MOAILuaStateHandle state = MOAILuaRuntime::Get ().State ();
this->PushLuaClassTable ( state );
state.SetField ( -1, LUAVAR_CONFIGURATION, name );
}
示例4: AKURunBytecode
//----------------------------------------------------------------//
void AKURunBytecode ( void* data, size_t size ) {
if ( size ) {
MOAILuaStateHandle state = MOAILuaRuntime::Get ().State ();
state.Run ( data, size, 0, 0 );
}
}
示例5: SendFinalizeEvent
//----------------------------------------------------------------//
void MOAISim::SendFinalizeEvent () {
MOAILuaStateHandle state = MOAILuaRuntime::Get ().State ();
if ( this->PushListener ( EVENT_FINALIZE, state )) {
state.DebugCall ( 0, 0 );
}
}
示例6: ShouldPause
void MOAISim::ShouldPause () {
MOAILuaStateHandle state = MOAILuaRuntime::Get ().State ();
if ( this->PushListener ( EVENT_WILL_PAUSE, state )) {
state.DebugCall ( 0, 0 );
}
}
示例7: WillEndSession
//----------------------------------------------------------------//
void MOAIApp::WillEndSession( ) {
MOAILuaRef& callback = this->mListeners [ SESSION_END ];
if ( callback ) {
MOAILuaStateHandle state = callback.GetSelf ();
state.DebugCall ( 0, 0 );
}
}
示例8: PauseMOAI
//----------------------------------------------------------------//
void MOAISim::PauseMOAI () {
MOAILuaStateHandle state = MOAILuaRuntime::Get ().State ();
if ( this->PushListener ( EVENT_PAUSED, state )) {
state.DebugCall ( 0, 0 );
}
this->mLoopState = PAUSED;
}
示例9: AKURunString
//----------------------------------------------------------------//
void AKURunString ( const char* script ) {
int status;
MOAILuaStateHandle state = MOAILuaRuntime::Get ().State ();
status = luaL_loadstring ( state, script );
if ( state.PrintErrors ( USLog::CONSOLE, status )) return;
state.DebugCall ( 0, 0 );
}
示例10: NotifyRestoreResponseReceived
//----------------------------------------------------------------//
void MOAIApp::NotifyRestoreResponseReceived ( int code ) {
MOAILuaRef& callback = this->mListeners [ RESTORE_RESPONSE_RECEIVED ];
if ( callback ) {
MOAILuaStateHandle state = callback.GetSelf ();
lua_pushinteger ( state, code );
state.DebugCall ( 1, 0 );
}
}
示例11: NotifyBillingSupported
//----------------------------------------------------------------//
void MOAIApp::NotifyBillingSupported ( bool supported ) {
MOAILuaRef& callback = this->mListeners [ CHECK_BILLING_SUPPORTED ];
if ( callback ) {
MOAILuaStateHandle state = callback.GetSelf ();
lua_pushboolean ( state, supported );
state.DebugCall ( 1, 0 );
}
}
示例12: NotifyInterstitialDismissed
//----------------------------------------------------------------//
void MOAIChartBoostAndroid::NotifyInterstitialDismissed () {
MOAILuaRef& callback = this->mListeners [ INTERSTITIAL_DISMISSED ];
if ( callback ) {
MOAILuaStateHandle state = callback.GetSelf ();
state.DebugCall ( 0, 0 );
}
}
示例13: NotifyInterstitialLoadFailed
//----------------------------------------------------------------//
void MOAIChartBoostAndroid::NotifyInterstitialLoadFailed () {
MOAILuaRef& callback = this->mListeners [ INTERSTITIAL_LOAD_FAILED ];
if ( callback ) {
MOAILuaStateHandle state = callback.GetSelf ();
state.DebugCall ( 0, 0 );
}
}
示例14: NotifyDialogDismissed
//----------------------------------------------------------------//
void MOAIApp::NotifyDialogDismissed ( int code ) {
MOAILuaRef& callback = this->mListeners [ DIALOG_DISMISSED ];
if ( callback ) {
MOAILuaStateHandle state = callback.GetSelf ();
lua_pushinteger ( state, code );
state.DebugCall ( 1, 0 );
}
}
示例15: NotifyDialogDismissed
//----------------------------------------------------------------//
void MOAIApp::NotifyDialogDismissed ( int dialogResult ) {
if ( ! mDialogCallback.IsNil() ) {
MOAILuaStateHandle state = mDialogCallback.GetSelf ();
state.Push ( dialogResult );
state.DebugCall ( 1, 0 );
mDialogCallback.Clear();
}
}