godot-cpp-utils
A collection of utility classes, functions and macros for use with Godot and GDExtension.
game_mode.hpp
1#ifndef UTILS_GAME_MODE_HPP
2#define UTILS_GAME_MODE_HPP
3
4#include <godot_cpp/classes/node.hpp>
5#include <godot_cpp/classes/packed_scene.hpp>
6
7namespace gd = godot;
8
9namespace utils {
16class GameMode : public gd::Node {
17 GDCLASS(GameMode, gd::Node);
18 static void _bind_methods();
19public:
20 void set_player_scene(gd::Ref<gd::PackedScene> scene);
21 gd::Ref<gd::PackedScene> get_player_scene() const;
22private:
23 gd::Ref<gd::PackedScene> player_scene{};
24};
25}
26
27#endif // !UTILS_GAME_MODE_HPP
Stores session-relevant data.
Definition game_mode.hpp:16
gd::Ref< gd::PackedScene > player_scene
The scene to instantiate when spawning a player.
Definition game_mode.hpp:23