mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-04-17 21:26:35 +02:00
Added ESSPhysicsQuery autoload's skeleton. It's purpose is so spell can request raycasts, and this will execute them in physics_process.
This commit is contained in:
parent
905da5161e
commit
8acd3e4a3a
1
SCsub
1
SCsub
@ -126,3 +126,4 @@ env.add_source_files(env.modules_sources,"profile_manager/class_profile.cpp")
|
||||
env.add_source_files(env.modules_sources,"profile_manager/profile_manager.cpp")
|
||||
|
||||
module_env.add_source_files(env.modules_sources,"autoloads/entity_data_manager.cpp")
|
||||
module_env.add_source_files(env.modules_sources,"autoloads/ess_physics_query.cpp")
|
||||
|
30
autoloads/ess_physics_query.cpp
Normal file
30
autoloads/ess_physics_query.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
#include "ess_physics_query.h"
|
||||
|
||||
ESSPhysicsQuery *ESSPhysicsQuery::instance;
|
||||
|
||||
ESSPhysicsQuery *ESSPhysicsQuery::get_instance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
void ESSPhysicsQuery::_notification(int p_what) {
|
||||
|
||||
switch (p_what) {
|
||||
|
||||
case NOTIFICATION_ENTER_TREE: {
|
||||
} break;
|
||||
case NOTIFICATION_EXIT_TREE: {
|
||||
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
void ESSPhysicsQuery::_bind_methods() {
|
||||
}
|
||||
|
||||
ESSPhysicsQuery::ESSPhysicsQuery() {
|
||||
instance = this;
|
||||
}
|
||||
|
||||
ESSPhysicsQuery::~ESSPhysicsQuery() {
|
||||
instance = NULL;
|
||||
}
|
23
autoloads/ess_physics_query.h
Normal file
23
autoloads/ess_physics_query.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef ESS_PHYSICS_QUERY_H
|
||||
#define ESS_PHYSICS_QUERY_H
|
||||
|
||||
#include "scene/main/node.h"
|
||||
|
||||
class ESSPhysicsQuery : public Node {
|
||||
GDCLASS(ESSPhysicsQuery, Node);
|
||||
|
||||
public:
|
||||
static ESSPhysicsQuery *get_instance();
|
||||
|
||||
ESSPhysicsQuery();
|
||||
~ESSPhysicsQuery();
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
void _notification(int p_what);
|
||||
|
||||
private:
|
||||
static ESSPhysicsQuery *instance;
|
||||
};
|
||||
|
||||
#endif
|
@ -3,10 +3,12 @@
|
||||
#include "entity_enums.h"
|
||||
#include "item_enums.h"
|
||||
|
||||
#include "autoloads/entity_data_manager.h"
|
||||
#include "autoloads/ess_physics_query.h"
|
||||
|
||||
#include "data/aura.h"
|
||||
#include "data/aura_group.h"
|
||||
#include "data/aura_stat_attribute.h"
|
||||
#include "autoloads/entity_data_manager.h"
|
||||
#include "data/xp_data.h"
|
||||
#include "data/item_stat_modifier.h"
|
||||
#include "data/item_template_stat_modifier.h"
|
||||
@ -126,6 +128,9 @@
|
||||
void register_entity_spell_system_types() {
|
||||
ClassDB::register_class<SpellEnums>();
|
||||
|
||||
ClassDB::register_class<EntityDataManager>();
|
||||
ClassDB::register_class<ESSPhysicsQuery>();
|
||||
|
||||
//data
|
||||
ClassDB::register_class<CraftRecipeHelper>();
|
||||
ClassDB::register_class<CraftRecipe>();
|
||||
@ -160,8 +165,6 @@ void register_entity_spell_system_types() {
|
||||
ClassDB::register_class<EntitySkill>();
|
||||
ClassDB::register_class<EntitySkillData>();
|
||||
|
||||
ClassDB::register_class<EntityDataManager>();
|
||||
|
||||
ClassDB::register_class<ItemVisual>();
|
||||
ClassDB::register_class<ItemVisualEntry>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user