Remove unnecessary argument from call_on_*
This commit is contained in:
parent
f9a42c4a04
commit
24a460be59
|
@ -100,22 +100,19 @@ void LimboState::add_event_handler(const String &p_event, const Callable &p_hand
|
||||||
handlers.insert(p_event, p_handler);
|
handlers.insert(p_event, p_handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
LimboState *LimboState::call_on_enter(Object *p_object, const Callable &p_callable) {
|
LimboState *LimboState::call_on_enter(const Callable &p_callable) {
|
||||||
ERR_FAIL_COND_V(p_object == nullptr, this);
|
|
||||||
ERR_FAIL_COND_V(!p_callable.is_valid(), this);
|
ERR_FAIL_COND_V(!p_callable.is_valid(), this);
|
||||||
connect(LimboStringNames::get_singleton()->entered, p_callable);
|
connect(LimboStringNames::get_singleton()->entered, p_callable);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
LimboState *LimboState::call_on_exit(Object *p_object, const Callable &p_callable) {
|
LimboState *LimboState::call_on_exit(const Callable &p_callable) {
|
||||||
ERR_FAIL_COND_V(p_object == nullptr, this);
|
|
||||||
ERR_FAIL_COND_V(!p_callable.is_valid(), this);
|
ERR_FAIL_COND_V(!p_callable.is_valid(), this);
|
||||||
connect(LimboStringNames::get_singleton()->exited, p_callable);
|
connect(LimboStringNames::get_singleton()->exited, p_callable);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
LimboState *LimboState::call_on_update(Object *p_object, const Callable &p_callable) {
|
LimboState *LimboState::call_on_update(const Callable &p_callable) {
|
||||||
ERR_FAIL_COND_V(p_object == nullptr, this);
|
|
||||||
ERR_FAIL_COND_V(!p_callable.is_valid(), this);
|
ERR_FAIL_COND_V(!p_callable.is_valid(), this);
|
||||||
connect(LimboStringNames::get_singleton()->updated, p_callable);
|
connect(LimboStringNames::get_singleton()->updated, p_callable);
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -62,9 +62,9 @@ public:
|
||||||
virtual bool dispatch(const String &p_event, const Variant &p_cargo);
|
virtual bool dispatch(const String &p_event, const Variant &p_cargo);
|
||||||
|
|
||||||
LimboState *named(String p_name);
|
LimboState *named(String p_name);
|
||||||
LimboState *call_on_enter(Object *p_object, const Callable &p_callable);
|
LimboState *call_on_enter(const Callable &p_callable);
|
||||||
LimboState *call_on_exit(Object *p_object, const Callable &p_callable);
|
LimboState *call_on_exit(const Callable &p_callable);
|
||||||
LimboState *call_on_update(Object *p_object, const Callable &p_callable);
|
LimboState *call_on_update(const Callable &p_callable);
|
||||||
|
|
||||||
_FORCE_INLINE_ String event_finished() const { return EVENT_FINISHED; }
|
_FORCE_INLINE_ String event_finished() const { return EVENT_FINISHED; }
|
||||||
LimboState *get_root() const;
|
LimboState *get_root() const;
|
||||||
|
|
Loading…
Reference in New Issue