Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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