#include "game_mode.hpp" #include #include #include #include "utils/godot_macros.h" #include "game_state.hpp" namespace godot { void GameMode::_bind_methods() { #define CLASSNAME GameMode GDPROPERTY_HINTED(game_state, Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, "GameState"); GDPROPERTY_HINTED(player_scene, Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, "PackedScene"); } void GameMode::set_player_scene(Ref scene) { this->player_scene = scene; } Ref GameMode::get_player_scene() const { return this->player_scene; } void GameMode::set_game_state(Ref state) { if(state.is_null() || !state.is_valid()) { this->game_state.unref(); return; } this->game_state = state; } Ref GameMode::get_game_state() { return this->game_state; } }