Created
January 6, 2017 23:41
-
-
Save codetravis/a5269f26a2720cb8bb54c17d4eaab473 to your computer and use it in GitHub Desktop.
11.11 Track the current level and set a maximum level
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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