Skip to content

Instantly share code, notes, and snippets.

@codetravis
Created January 6, 2017 23:41
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/a5269f26a2720cb8bb54c17d4eaab473 to your computer and use it in GitHub Desktop.
Save codetravis/a5269f26a2720cb8bb54c17d4eaab473 to your computer and use it in GitHub Desktop.
11.11 Track the current level and set a maximum level
#FantomX_UsePhysics = True
Import fantomX
Import character
Import projectile
Import custom_engine
Class Game Extends App
Field engine:ftEngine
'............................
Field game_state:Int
' create a changeable field to hold the current level
Field current_level:Int
' create a constant field to hold the final level
Const FINAL_LEVEL:Int = 2
Const PLAYER_GROUP:Int = 1
'.............................
Method OnCreate()
'..................................
Self.start_time = Millisecs()
Self.boss_time = 15000
Self.game_state = STATE_LEVEL
' set the current level
Self.current_level = 1
Seed = Millisecs()
End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment