Use resource's built in changed signal in EntityResource, instead of a custom one.

This commit is contained in:
Relintai 2020-06-20 16:10:52 +02:00
parent d3951436bd
commit 1946fd96a4

View File

@ -62,7 +62,7 @@ void EntityResource::set_current_value(const int value) {
_dirty = true;
//emit_signal("changed", Ref<EntityResource>(this));
emit_changed();
}
int EntityResource::get_max_value() const {
@ -73,7 +73,7 @@ void EntityResource::set_max_value(const int value) {
_dirty = true;
//emit_signal("changed", Ref<EntityResource>(this));
emit_changed();
}
Entity *EntityResource::get_owner() {
@ -258,8 +258,6 @@ void EntityResource::_bind_methods() {
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::STRING, "str"), "_gets_update_string"));
BIND_VMETHOD(MethodInfo("_receivec_update_string", PropertyInfo(Variant::STRING, "str")));
ADD_SIGNAL(MethodInfo("entity_resource_changed", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "EntityResource")));
//Serialization
BIND_VMETHOD(MethodInfo("_from_dict", PropertyInfo(Variant::DICTIONARY, "dict")));
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::DICTIONARY, "dict"), "_to_dict"));