O'Reilly logo

Haxe Game Development Essentials by Jeremy McCurdy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required