Win Game Screen - UQcsse3200/2026-studio-4 GitHub Wiki

Win Screen

Overview

The win screen appears after the final boss ending dialogue is completed.

It displays a victory animation, plays win music and allows the player to return to the main menu.

Triggering the Win Screen

The final dialogue is handled by FinalBossEndingDialogueComponent.

Also, can be triggered using the key combo-> Cntrl + Shift + W

After the player advances past the final dialogue line, the component triggers:

target.getEvents().trigger("winScreenRequested");

The target is the player entity.

Processing the Win Request

MainGameScreen listens for the event and stores a request flag. After the entity update completes, it changes to the win screen:

if (winScreenRequested) {
  winScreenRequested = false;
  game.setScreen(ScreenType.WIN_SCREEN);
  return;
}

Delaying the transition until after the entity update prevents the game screen from being disposed while dialogue input is still being processed.

Win Screen Contents

WinScreen:

  • Loads images/win_dance.gif
  • Plays sounds/win_music.mp3
  • Displays the YOU WIN! title
  • Loops the victory animation
  • Provides a Main Menu button

The screen is opened with:

game.setScreen(GdxGame.ScreenType.WIN_SCREEN);

Returning to the Main Menu

The Main Menu button changes the screen back to:

game.setScreen(GdxGame.ScreenType.MAIN_MENU);

When the win screen closes, it disposes the win music, GIF textures, renderer and services.

Main Classes

Class | Responsibility -- | -- FinalBossEndingDialogueComponent | Displays final dialogue and triggers the win event MainGameScreen | Receives the win event and changes screens GdxGame | Creates the WIN_SCREEN screen WinScreen | Displays the victory animation and music
⚠️ **GitHub.com Fallback** ⚠️