GXSceneStop - boxgaming/gx GitHub Wiki
Syntax
GXSceneStop
Description
Stop the game loop.
This method will cause the game loop to end and return control to the calling program.
Examples
Example1: Create a scene and start the game loop. Exit the game loop when the user presses the ESC key. Once the game loop completes print a message and exit.
'$INCLUDE: 'gx.bi'
GXSceneCreate 320, 200
GXSceneStart
PRINT "Game Over"
SUB GXOnGameEvent (e AS GXEvent)
SELECT CASE e.event
CASE GXEVENT_UPDATE
IF GXKeyDown(GXKEY_ESC) THEN GXSceneStop
END SELECT
END SUB
'$INCLUDE: 'gx.bm'