Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events when MOAISim is paused by host via AKUPause () #599

Open
typeoneerror opened this issue Nov 26, 2012 · 0 comments
Open

Events when MOAISim is paused by host via AKUPause () #599

typeoneerror opened this issue Nov 26, 2012 · 0 comments
Milestone

Comments

@typeoneerror
Copy link
Contributor

How can we call a custom bit of lua when our host is paused? For example, in the iOS host, the MOAIView calls AKUPause when the app goes to the background or similar:

-( void ) pause :( BOOL )paused {

    if ( paused ) {
        AKUPause ( YES );
        [ self stopAnimation ];
    }
    else {
        [ self startAnimation ];
        AKUPause ( NO );
    }
}

AKUPause just call the resume and pause methods on MOAISim:

void AKUPause ( bool pause ) {

    if ( pause ) {
        MOAISim::Get().PauseMOAI ();
    }
    else {
        MOAISim::Get().ResumeMOAI ();
    }
}

These just seem to set flags. Is there no event that we can listen to, i.e. MOAISim.EVENT_PAUSED/EVENT_RESUMED or would we need to write that ourselves and compile MOAI manually? This would be a nice feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant