We're on the home stretch! The last things we have to do are setting up the game timer and showing the level-end screen! Open up
PlayState to make the last few changes.
LevelEndScreen class is in a package, we'll need to import it to use it, so add this to your
Next, we'll have to add new variables to handle the timer functionality:
private var levelTimer:FlxTimer; private var levelTime:Int = 15; private var ticks:Int = 0;
levelTimer variable is a
FlxTimer like the one we used when making enemies. The
levelTime variable is the duration that the game will run for. The
ticks variable is used to keep track of the number of ...