Rally Rush
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
godot::EndScreen Class Reference

The game-over screen, used both when the player has won and lost the game. More...

#include <end_screen.hpp>

Inheritance diagram for godot::EndScreen:

Public Member Functions

virtual void _ready () override
 Fetch buttons from children and register observers.
 
void return_to_main ()
 Listener for return to menu button "button_down" observer. Load the main menu scene.
 
void restart ()
 Listener for restart button "button_down" observer. Load the game scene.
 
void set_main_menu_scene (Ref< PackedScene > scene)
 The scene to load when return to main menu is pressed.
 
Ref< PackedScene > get_main_menu_scene () const
 The scene to load when return to main menu is pressed.
 
void set_game_scene (Ref< PackedScene > scene)
 The scene to load when the restart game button is pressed.
 
Ref< PackedScene > get_game_scene () const
 The scene to load when the restart game button is pressed.
 

Private Member Functions

 GDCLASS (EndScreen, CanvasLayer)
 

Static Private Member Functions

static void _bind_methods ()
 Bind editor properties.
 

Private Attributes

Ref< PackedScene > game_scene {}
 
Ref< PackedScene > main_menu_scene {}
 

Detailed Description

The game-over screen, used both when the player has won and lost the game.

Member Function Documentation

◆ _bind_methods()

void godot::EndScreen::_bind_methods ( )
staticprivate

Bind editor properties.

◆ _ready()

void godot::EndScreen::_ready ( )
overridevirtual

Fetch buttons from children and register observers.

◆ GDCLASS()

godot::EndScreen::GDCLASS ( EndScreen  ,
CanvasLayer   
)
private

◆ get_game_scene()

Ref< PackedScene > godot::EndScreen::get_game_scene ( ) const

The scene to load when the restart game button is pressed.

◆ get_main_menu_scene()

Ref< PackedScene > godot::EndScreen::get_main_menu_scene ( ) const

The scene to load when return to main menu is pressed.

◆ restart()

void godot::EndScreen::restart ( )

Listener for restart button "button_down" observer. Load the game scene.

◆ return_to_main()

void godot::EndScreen::return_to_main ( )

Listener for return to menu button "button_down" observer. Load the main menu scene.

◆ set_game_scene()

void godot::EndScreen::set_game_scene ( Ref< PackedScene >  scene)

The scene to load when the restart game button is pressed.

◆ set_main_menu_scene()

void godot::EndScreen::set_main_menu_scene ( Ref< PackedScene >  scene)

The scene to load when return to main menu is pressed.

Member Data Documentation

◆ game_scene

Ref<PackedScene> godot::EndScreen::game_scene {}
private

◆ main_menu_scene

Ref<PackedScene> godot::EndScreen::main_menu_scene {}
private

The documentation for this class was generated from the following files: