moonbase functions - Protovision/moonbase GitHub Wiki
moonbase.getFps( )
Returns the number of frames per second that the engine is executing. The engine's fps is not necessarily the same as the window's refresh rate.
moonbase.getTicks( )
Returns the number of milliseconds since the engine began initialization.
moonbase.resume( ... )
This function can only be called during a moonbase.event callback. moonbase.resume resumes execution of moonbase.main. moonbase.event callbacks will be disabled until the next call to moonbase.yield. Any arguments supplied to this function will be returned from the last call to moonbase.yield.
moonbase.setFps( fps )
Sets the number of frames per second that the engine executes. The engine's fps is not necessarily the same as the window's refresh rate.
moonbase.yield( ms )
This function can only be called while moonbase.main() is running. moonbase.yield suspends execution of moonbase.main and enables execution of moonbase.event callbacks. If ms is supplied, this function will return after ms milliseconds (unless moonbase.resume is called sooner); otherwise, this function will block until the next call to moonbase.resume. Returns any values passed to the last call to moonbase.resume.
moonbase.quit( )
Triggers moonbase.event.shutdown( ) to be called, before shutting down and exiting the engine.