mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-02-22 17:18:12 +01:00
Emit changed signal in EntityResouce in receivec_update, and from_dict.
This commit is contained in:
parent
28f2cc1f38
commit
ce2d652456
@ -145,6 +145,8 @@ void EntityResource::receivec_update(const int current) {
|
|||||||
void EntityResource::receivec_update_full(const int current, const int max) {
|
void EntityResource::receivec_update_full(const int current, const int max) {
|
||||||
_current = current;
|
_current = current;
|
||||||
_max = max;
|
_max = max;
|
||||||
|
|
||||||
|
emit_changed();
|
||||||
}
|
}
|
||||||
void EntityResource::receivec_update_string(const String str) {
|
void EntityResource::receivec_update_string(const String str) {
|
||||||
if (has_method("_receivec_update_string"))
|
if (has_method("_receivec_update_string"))
|
||||||
@ -187,6 +189,8 @@ void EntityResource::_from_dict(const Dictionary &dict) {
|
|||||||
//_data_id = dict.get("data_id", 0);
|
//_data_id = dict.get("data_id", 0);
|
||||||
_current = dict.get("current", 0);
|
_current = dict.get("current", 0);
|
||||||
_max = dict.get("max", 0);
|
_max = dict.get("max", 0);
|
||||||
|
|
||||||
|
emit_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityResource::EntityResource() {
|
EntityResource::EntityResource() {
|
||||||
|
Loading…
Reference in New Issue
Block a user