GameOverScreen .h/.cpp made. Godot scene completed
This commit is contained in:
26
src/gui/game_over/GameOverScreen.cpp
Normal file
26
src/gui/game_over/GameOverScreen.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "gui/game_over/GameOverScreen.h"
|
||||
#include <Node.hpp>
|
||||
using namespace godot;
|
||||
|
||||
void GameOverScreen::_register_methods()
|
||||
{
|
||||
register_method("_on_botonreiniciar_pressed", &GameOverScreen::_on_botonreiniciar_pressed);
|
||||
}
|
||||
|
||||
GameOverScreen::GameOverScreen()
|
||||
{
|
||||
}
|
||||
|
||||
GameOverScreen::~GameOverScreen()
|
||||
{
|
||||
}
|
||||
|
||||
void GameOverScreen::_init()
|
||||
{
|
||||
|
||||
}
|
||||
void GameOverScreen::_on_botonreiniciar_pressed()
|
||||
{
|
||||
get_tree().change_scene("res://monitor/GUI.tscn");
|
||||
|
||||
}
|
58
src/gui/game_over/GameOverScreen.h
Normal file
58
src/gui/game_over/GameOverScreen.h
Normal file
@@ -0,0 +1,58 @@
|
||||
#ifndef ALAI_GAME_OVER_SCREEN
|
||||
#define ALAI_GAME_OVER_SCREEN
|
||||
|
||||
|
||||
#include <Godot.hpp>
|
||||
#include <Node.hpp>
|
||||
#include <Control.hpp>
|
||||
|
||||
namespace godot
|
||||
{
|
||||
/**
|
||||
* @brief This class controls what happens when the Coin is in the collected .
|
||||
*
|
||||
*/
|
||||
class GameOverScreen : public Control
|
||||
{
|
||||
GODOT_CLASS(GameOverScreen, Control)
|
||||
|
||||
private:
|
||||
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief This method registers classes with Godot.
|
||||
*
|
||||
* @details This method registers methods, properties, and signals with the Godot engine.
|
||||
*/
|
||||
static void _register_methods();
|
||||
|
||||
/**
|
||||
* @brief Construct a new GameOverScreen object.
|
||||
*
|
||||
*/
|
||||
GameOverScreen();
|
||||
|
||||
/**
|
||||
* @brief Destroy the GameOverScreen object.
|
||||
*
|
||||
*/
|
||||
~GameOverScreen();
|
||||
|
||||
/**
|
||||
* @brief Initialize the class from Godot.
|
||||
*
|
||||
* @details This method is called just once when the Godot engine connects to the instance of the class.
|
||||
*/
|
||||
void _init();
|
||||
|
||||
/**
|
||||
* @brief Called when the collected of the coin is entered.
|
||||
*
|
||||
*/
|
||||
void _on_botonreiniciar_pressed();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user