Updating the level end screen
Now that we've built the splash screen, we're going to build on what we know and make the level end screen more interesting:
- We're going to add art to the screen so that it looks nicer
- Then, we're going to use a button to reset the level instead of clicking anywhere
- After that, we're going to keep track of high scores to give players a goal while playing
- Finally, we're going to make another animated sequence, as we did on the splash screen
Adding imports
To start, open LevelEndScreen.hx
and add the following imports:
import AssetPaths; import Reg; import flixel.ui.FlxButton; import flixel.effects.FlxFlicker; import flixel.group.FlxGroup; import flixel.tweens.FlxTween; import flixel.tweens.FlxEase;
Adding variables
Next, in the variables
section, add these new FlxSprite
variables:
private var windowHeader:FlxSprite; private var newBestScore:FlxSprite; private var window:FlxSprite;
The windowHeader
sprite is the header of the window we&apos...