feat: added register_types

main
Sara 2024-05-28 14:14:09 +02:00
parent 7bdb5e70eb
commit 54fcbcbb6b
2 changed files with 23 additions and 0 deletions

17
register_types.cpp Normal file
View File

@ -0,0 +1,17 @@
#include "register_types.hpp"
#include <godot_cpp/core/class_db.hpp>
#include "game_root.hpp"
#include "game_mode.hpp"
#include "game_state.hpp"
#include "level.hpp"
using namespace godot;
void godot_cpp_utils_register_types() {
ClassDB::register_class<GameRoot3D>();
ClassDB::register_class<GameMode>();
ClassDB::register_class<GameState>();
ClassDB::register_class<Level3D>();
ClassDB::register_class<SpawnPoint3D>();
ClassDB::register_class<PlayerInput>();
}

6
register_types.hpp Normal file
View File

@ -0,0 +1,6 @@
#ifndef UTILS_REGISTER_TYPES_HPP
#define UTILS_REGISTER_TYPES_HPP
void godot_cpp_utils_register_types();
#endif // !UTILS_REGISTER_TYPES_HPP