mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-02-22 17:18:12 +01:00
Added deferred versions of request_world_spell_spawn, and request_world_spell.
This commit is contained in:
parent
0bdf71c431
commit
a73f61628b
@ -936,9 +936,15 @@ void EntityDataManager::load_entity_species_datas() {
|
|||||||
void EntityDataManager::request_entity_spawn(const Ref<EntityCreateInfo> &info) {
|
void EntityDataManager::request_entity_spawn(const Ref<EntityCreateInfo> &info) {
|
||||||
emit_signal("on_entity_spawn_requested", info);
|
emit_signal("on_entity_spawn_requested", info);
|
||||||
}
|
}
|
||||||
|
void EntityDataManager::request_entity_spawn_deferred(const Ref<EntityCreateInfo> &info) {
|
||||||
|
call_deferred("emit_signal", "on_entity_spawn_requested", info);
|
||||||
|
}
|
||||||
void EntityDataManager::request_world_spell_spawn(const Ref<WorldSpellData> &data, const Ref<SpellCastInfo> &info) {
|
void EntityDataManager::request_world_spell_spawn(const Ref<WorldSpellData> &data, const Ref<SpellCastInfo> &info) {
|
||||||
emit_signal("on_world_spell_spawn_requested", data, info);
|
emit_signal("on_world_spell_spawn_requested", data, info);
|
||||||
}
|
}
|
||||||
|
void EntityDataManager::request_world_spell_spawn_deferred(const Ref<WorldSpellData> &data, const Ref<SpellCastInfo> &info) {
|
||||||
|
call_deferred("emit_signal", "on_world_spell_spawn_requested", data, info);
|
||||||
|
}
|
||||||
|
|
||||||
void EntityDataManager::_bind_methods() {
|
void EntityDataManager::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("get_skill_for_armor_type", "index"), &EntityDataManager::get_skill_for_armor_type);
|
ClassDB::bind_method(D_METHOD("get_skill_for_armor_type", "index"), &EntityDataManager::get_skill_for_armor_type);
|
||||||
@ -1088,7 +1094,9 @@ void EntityDataManager::_bind_methods() {
|
|||||||
ADD_SIGNAL(MethodInfo("on_world_spell_spawn_requested", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "WorldSpellData"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
ADD_SIGNAL(MethodInfo("on_world_spell_spawn_requested", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "WorldSpellData"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("request_entity_spawn", "info"), &EntityDataManager::request_entity_spawn);
|
ClassDB::bind_method(D_METHOD("request_entity_spawn", "info"), &EntityDataManager::request_entity_spawn);
|
||||||
|
ClassDB::bind_method(D_METHOD("request_entity_spawn_deferred", "info"), &EntityDataManager::request_entity_spawn_deferred);
|
||||||
ClassDB::bind_method(D_METHOD("request_world_spell_spawn", "data", "info"), &EntityDataManager::request_world_spell_spawn);
|
ClassDB::bind_method(D_METHOD("request_world_spell_spawn", "data", "info"), &EntityDataManager::request_world_spell_spawn);
|
||||||
|
ClassDB::bind_method(D_METHOD("request_world_spell_spawn_deferred", "data", "info"), &EntityDataManager::request_world_spell_spawn_deferred);
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityDataManager::EntityDataManager() {
|
EntityDataManager::EntityDataManager() {
|
||||||
|
@ -175,7 +175,9 @@ public:
|
|||||||
void load_entity_species_datas();
|
void load_entity_species_datas();
|
||||||
|
|
||||||
void request_entity_spawn(const Ref<EntityCreateInfo> &info);
|
void request_entity_spawn(const Ref<EntityCreateInfo> &info);
|
||||||
|
void request_entity_spawn_deferred(const Ref<EntityCreateInfo> &info);
|
||||||
void request_world_spell_spawn(const Ref<WorldSpellData> &data, const Ref<SpellCastInfo> &info);
|
void request_world_spell_spawn(const Ref<WorldSpellData> &data, const Ref<SpellCastInfo> &info);
|
||||||
|
void request_world_spell_spawn_deferred(const Ref<WorldSpellData> &data, const Ref<SpellCastInfo> &info);
|
||||||
|
|
||||||
EntityDataManager();
|
EntityDataManager();
|
||||||
~EntityDataManager();
|
~EntityDataManager();
|
||||||
|
Loading…
Reference in New Issue
Block a user