Skip to content

Instantly share code, notes, and snippets.

@codetravis
Last active December 28, 2016 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codetravis/c015bc40c20733af0602b7bb6704655a to your computer and use it in GitHub Desktop.
Save codetravis/c015bc40c20733af0602b7bb6704655a to your computer and use it in GitHub Desktop.
9.1 Add a Game Over Scene
#FantomX_UsePhysics = True
Import fantomX
Import character
Import projectile
Import custom_engine
Class Game Extends App
Field engine:ftEngine
' create a play scene and a game over scene and a game over layer
Field play_layer:ftLayer
Field play_scene:ftScene
Field game_over_scene:ftScene
Field game_over_layer:ftLayer
Field player:Character
Field enemies:List<Character>
Field last_enemy_time:Float
Field next_enemy_interval:Float
Field projectiles:List<Projectile>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment