2024-05-28 14:28:36 +00:00
|
|
|
#ifndef GAME_MODE_HPP
|
|
|
|
#define GAME_MODE_HPP
|
2024-03-13 15:08:37 +00:00
|
|
|
|
|
|
|
#include <godot_cpp/classes/packed_scene.hpp>
|
|
|
|
#include <godot_cpp/classes/resource.hpp>
|
|
|
|
#include "game_state.hpp"
|
|
|
|
|
2024-05-28 14:28:36 +00:00
|
|
|
namespace gd = godot;
|
|
|
|
|
|
|
|
namespace utils {
|
|
|
|
class GameMode : public gd::Resource {
|
|
|
|
GDCLASS(GameMode, gd::Resource);
|
2024-03-13 15:08:37 +00:00
|
|
|
static void _bind_methods();
|
|
|
|
public:
|
2024-03-21 21:49:11 +00:00
|
|
|
virtual void _begin();
|
|
|
|
virtual void _end();
|
|
|
|
|
2024-05-28 14:28:36 +00:00
|
|
|
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();
|
2024-03-13 15:08:37 +00:00
|
|
|
private:
|
2024-05-28 14:28:36 +00:00
|
|
|
gd::Ref<gd::PackedScene> player_scene{};
|
|
|
|
gd::Ref<GameState> game_state{};
|
2024-03-13 15:08:37 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2024-05-28 14:28:36 +00:00
|
|
|
#endif // !GAME_MODE_HPP
|