godot-cpp-utils/game_mode.hpp

29 lines
699 B
C++
Raw Normal View History

#ifndef GAME_MODE_HPP
#define GAME_MODE_HPP
#include <godot_cpp/classes/packed_scene.hpp>
#include <godot_cpp/classes/resource.hpp>
#include "game_state.hpp"
namespace gd = godot;
namespace utils {
class GameMode : public gd::Resource {
GDCLASS(GameMode, gd::Resource);
static void _bind_methods();
public:
virtual void _begin();
virtual void _end();
void set_player_scene(gd::Ref<gd::PackedScene> scene);
gd::Ref<gd::PackedScene> get_player_scene() const;
void set_game_state(gd::Ref<GameState> state);
gd::Ref<GameState> get_game_state();
private:
gd::Ref<gd::PackedScene> player_scene{};
gd::Ref<GameState> game_state{};
};
}
#endif // !GAME_MODE_HPP