Merge pull request #19410 from swarnimarun/tween-stopped
Adding is_stopped method to Tween
This commit is contained in:
commit
3cd09cd943
@ -201,6 +201,7 @@ void Tween::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("reset_all"), &Tween::reset_all);
|
ClassDB::bind_method(D_METHOD("reset_all"), &Tween::reset_all);
|
||||||
ClassDB::bind_method(D_METHOD("stop", "object", "key"), &Tween::stop, DEFVAL(""));
|
ClassDB::bind_method(D_METHOD("stop", "object", "key"), &Tween::stop, DEFVAL(""));
|
||||||
ClassDB::bind_method(D_METHOD("stop_all"), &Tween::stop_all);
|
ClassDB::bind_method(D_METHOD("stop_all"), &Tween::stop_all);
|
||||||
|
ClassDB::bind_method(D_METHOD("is_stopped"), &Tween::is_stopped);
|
||||||
ClassDB::bind_method(D_METHOD("resume", "object", "key"), &Tween::resume, DEFVAL(""));
|
ClassDB::bind_method(D_METHOD("resume", "object", "key"), &Tween::resume, DEFVAL(""));
|
||||||
ClassDB::bind_method(D_METHOD("resume_all"), &Tween::resume_all);
|
ClassDB::bind_method(D_METHOD("resume_all"), &Tween::resume_all);
|
||||||
ClassDB::bind_method(D_METHOD("remove", "object", "key"), &Tween::remove, DEFVAL(""));
|
ClassDB::bind_method(D_METHOD("remove", "object", "key"), &Tween::remove, DEFVAL(""));
|
||||||
@ -743,6 +744,10 @@ bool Tween::stop(Object *p_object, StringName p_key) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Tween::is_stopped() const {
|
||||||
|
return tell() >= get_runtime();
|
||||||
|
}
|
||||||
|
|
||||||
bool Tween::stop_all() {
|
bool Tween::stop_all() {
|
||||||
|
|
||||||
set_active(false);
|
set_active(false);
|
||||||
|
@ -162,6 +162,7 @@ public:
|
|||||||
bool reset_all();
|
bool reset_all();
|
||||||
bool stop(Object *p_object, StringName p_key);
|
bool stop(Object *p_object, StringName p_key);
|
||||||
bool stop_all();
|
bool stop_all();
|
||||||
|
bool is_stopped() const;
|
||||||
bool resume(Object *p_object, StringName p_key);
|
bool resume(Object *p_object, StringName p_key);
|
||||||
bool resume_all();
|
bool resume_all();
|
||||||
bool remove(Object *p_object, StringName p_key);
|
bool remove(Object *p_object, StringName p_key);
|
||||||
|
Loading…
Reference in New Issue
Block a user