# Rally Rush: src/end_screen.hpp Source File

Loading...
Searching...
No Matches
end_screen.hpp
Go to the documentation of this file.
#ifndef END_SCREEN_HPP
#define END_SCREEN_HPP
#include "godot_cpp/classes/canvas_layer.hpp"
#include "godot_cpp/classes/packed_scene.hpp"
namespace godot {
class EndScreen : public CanvasLayer {
GDCLASS(EndScreen, CanvasLayer);
static void _bind_methods();
public:
virtual void _ready() override;
void return_to_main();
void restart();
void set_main_menu_scene(Ref<PackedScene> scene);
Ref<PackedScene> get_main_menu_scene() const;
void set_game_scene(Ref<PackedScene> scene);
Ref<PackedScene> get_game_scene() const;
private:
Ref<PackedScene> game_scene{};
Ref<PackedScene> main_menu_scene{};
};
}
#endif // !END_SCREEN_HPP
godot::EndScreen
The game-over screen, used both when the player has won and lost the game.
Definition end_screen.hpp:8
godot::EndScreen::return_to_main
void return_to_main()
Listener for return to menu button "button_down" observer. Load the main menu scene.
Definition end_screen.cpp:22
godot::EndScreen::main_menu_scene
Ref< PackedScene > main_menu_scene
Definition end_screen.hpp:31
godot::EndScreen::set_main_menu_scene
void set_main_menu_scene(Ref< PackedScene > scene)
The scene to load when return to main menu is pressed.
Definition end_screen.cpp:31
godot::EndScreen::_bind_methods
static void _bind_methods()
Bind editor properties.
Definition end_screen.cpp:8
godot::EndScreen::get_main_menu_scene
Ref< PackedScene > get_main_menu_scene() const
The scene to load when return to main menu is pressed.
Definition end_screen.cpp:35
godot::EndScreen::game_scene
Ref< PackedScene > game_scene
Definition end_screen.hpp:30
godot::EndScreen::_ready
virtual void _ready() override
Fetch buttons from children and register observers.
Definition end_screen.cpp:14
godot::EndScreen::GDCLASS
GDCLASS(EndScreen, CanvasLayer)
godot::EndScreen::restart
void restart()
Listener for restart button "button_down" observer. Load the game scene.
Definition end_screen.cpp:26
godot::EndScreen::get_game_scene
Ref< PackedScene > get_game_scene() const
The scene to load when the restart game button is pressed.
Definition end_screen.cpp:43
godot::EndScreen::set_game_scene
void set_game_scene(Ref< PackedScene > scene)
The scene to load when the restart game button is pressed.
Definition end_screen.cpp:39
godot
Definition beacon_powerup.cpp:6