godot-cpp-utils/level.hpp

26 lines
735 B
C++

#ifndef UTILS_LEVEL_HPP
#define UTILS_LEVEL_HPP
#include "game_mode.hpp"
#include <godot_cpp/classes/node3d.hpp>
namespace gd = godot;
namespace utils {
/*! 3D level root to be used with GameRoot3D.
*
* The configured game mode will become the active GameMode in GameRoot3D if one does not exist yet.
*/
class Level3D : public gd::Node3D {
GDCLASS(Level3D, gd::Node3D);
static void _bind_methods();
public:
void set_game_mode_prototype(gd::Ref<gd::PackedScene> prototype);
gd::Ref<gd::PackedScene> get_game_mode_prototype() const;
private:
gd::Ref<gd::PackedScene> game_mode_prototype{}; //!< The starting state of the game mode to instantiate if this is the "leading" level.
};
}
#endif // !UTILS_LEVEL_HPP