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);
|
||||
}
|
||||
|
||||
LimboState *LimboState::call_on_enter(Object *p_object, const Callable &p_callable) {
|
||||
ERR_FAIL_COND_V(p_object == nullptr, this);
|
||||
LimboState *LimboState::call_on_enter(const Callable &p_callable) {
|
||||
ERR_FAIL_COND_V(!p_callable.is_valid(), this);
|
||||
connect(LimboStringNames::get_singleton()->entered, p_callable);
|
||||
return this;
|
||||
}
|
||||
|
||||
LimboState *LimboState::call_on_exit(Object *p_object, const Callable &p_callable) {
|
||||
ERR_FAIL_COND_V(p_object == nullptr, this);
|
||||
LimboState *LimboState::call_on_exit(const Callable &p_callable) {
|
||||
ERR_FAIL_COND_V(!p_callable.is_valid(), this);
|
||||
connect(LimboStringNames::get_singleton()->exited, p_callable);
|
||||
return this;
|
||||
}
|
||||
|
||||
LimboState *LimboState::call_on_update(Object *p_object, const Callable &p_callable) {
|
||||
ERR_FAIL_COND_V(p_object == nullptr, this);
|
||||
LimboState *LimboState::call_on_update(const Callable &p_callable) {
|
||||
ERR_FAIL_COND_V(!p_callable.is_valid(), this);
|
||||
connect(LimboStringNames::get_singleton()->updated, p_callable);
|
||||
return this;
|
||||
|
|
|
@ -62,9 +62,9 @@ public:
|
|||
virtual bool dispatch(const String &p_event, const Variant &p_cargo);
|
||||
|
||||
LimboState *named(String p_name);
|
||||
LimboState *call_on_enter(Object *p_object, const Callable &p_callable);
|
||||
LimboState *call_on_exit(Object *p_object, const Callable &p_callable);
|
||||
LimboState *call_on_update(Object *p_object, const Callable &p_callable);
|
||||
LimboState *call_on_enter(const Callable &p_callable);
|
||||
LimboState *call_on_exit(const Callable &p_callable);
|
||||
LimboState *call_on_update(const Callable &p_callable);
|
||||
|
||||
_FORCE_INLINE_ String event_finished() const { return EVENT_FINISHED; }
|
||||
LimboState *get_root() const;
|
||||
|
|
Loading…
Reference in New Issue