From a8153c3ec48f1ab7cb8e378a7022fc59b8609f94 Mon Sep 17 00:00:00 2001 From: Sara Date: Thu, 21 Mar 2024 22:49:11 +0100 Subject: [PATCH] feat: added _begin and _end to GameMode --- game_mode.cpp | 3 +++ game_mode.hpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/game_mode.cpp b/game_mode.cpp index f13b40b..f6fdf15 100644 --- a/game_mode.cpp +++ b/game_mode.cpp @@ -12,6 +12,9 @@ void GameMode::_bind_methods() { GDPROPERTY_HINTED(player_scene, Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, "PackedScene"); } +void GameMode::_begin() {} +void GameMode::_end() {} + void GameMode::set_player_scene(Ref scene) { this->player_scene = scene; } diff --git a/game_mode.hpp b/game_mode.hpp index d589a37..737e03f 100644 --- a/game_mode.hpp +++ b/game_mode.hpp @@ -10,6 +10,9 @@ class GameMode : public Resource { GDCLASS(GameMode, Resource); static void _bind_methods(); public: + virtual void _begin(); + virtual void _end(); + void set_player_scene(Ref scene); Ref get_player_scene() const; void set_game_state(Ref state);