GameOverScreen .h/.cpp made. Godot scene completed

This commit is contained in:
2022-08-12 21:50:48 -04:00
parent e54e3b0687
commit 64102a992a
4 changed files with 139 additions and 0 deletions

View 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");
}

View 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