fix function name and pointer usage

This commit is contained in:
Chris Cromer 2022-08-26 13:51:19 -04:00
parent ff600cd761
commit b74a8ce1aa
Signed by: cromer
GPG Key ID: FA91071797BEEEC2
2 changed files with 7 additions and 6 deletions

View File

@ -1,10 +1,12 @@
#include "gui/game_over/GameOverScreen.h" #include "gui/game_over/GameOverScreen.h"
#include <Node.hpp> #include <Node.hpp>
#include <SceneTree.hpp>
using namespace godot; using namespace godot;
void GameOverScreen::_register_methods() void GameOverScreen::_register_methods()
{ {
register_method("_on_botonreiniciar_pressed", &GameOverScreen::_on_botonreiniciar_pressed); register_method("_on_restart_button_pressed", &GameOverScreen::_on_restart_button_pressed);
} }
GameOverScreen::GameOverScreen() GameOverScreen::GameOverScreen()
@ -19,8 +21,7 @@ void GameOverScreen::_init()
{ {
} }
void GameOverScreen::_on_botonreiniciar_pressed() void GameOverScreen::_on_restart_button_pressed()
{ {
get_tree().change_scene("res://monitor/GUI.tscn"); get_tree()->change_scene("res://monitor/GUI.tscn");
} }

View File

@ -49,7 +49,7 @@ namespace godot
* @brief Called when the collected of the coin is entered. * @brief Called when the collected of the coin is entered.
* *
*/ */
void _on_botonreiniciar_pressed(); void _on_restart_button_pressed();
}; };
} }