feat: added _begin and _end to GameMode

stripped
Sara 2024-03-21 22:49:11 +01:00
parent 34a0493ee7
commit a8153c3ec4
2 changed files with 6 additions and 0 deletions

View File

@ -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<PackedScene> scene) {
this->player_scene = scene;
}

View File

@ -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<PackedScene> scene);
Ref<PackedScene> get_player_scene() const;
void set_game_state(Ref<GameState> state);