diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index f4fc58b9bf9..c29e67340e7 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -45,7 +45,7 @@ [b]Note:[/b] After the timer enters the tree, this property is automatically set to [code]false[/code]. [b]Note:[/b] This property does nothing when the timer is running in the editor. - + If [code]true[/code], the timer will ignore [member Engine.time_scale] and update with the real, elapsed time. diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 7e852265302..a9fccb4746a 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -94,7 +94,7 @@ void SceneTreeTimer::set_ignore_time_scale(bool p_ignore) { ignore_time_scale = p_ignore; } -bool SceneTreeTimer::is_ignore_time_scale() { +bool SceneTreeTimer::is_ignoring_time_scale() { return ignore_time_scale; } @@ -657,7 +657,7 @@ void SceneTree::process_timers(double p_delta, bool p_physics_frame) { } double time_left = E->get()->get_time_left(); - if (E->get()->is_ignore_time_scale()) { + if (E->get()->is_ignoring_time_scale()) { time_left -= Engine::get_singleton()->get_process_step(); } else { time_left -= p_delta; diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index 291e4a5a0cf..f7df4c12a84 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -74,7 +74,7 @@ public: bool is_process_in_physics(); void set_ignore_time_scale(bool p_ignore); - bool is_ignore_time_scale(); + bool is_ignoring_time_scale(); void release_connections(); diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp index 53c815f223e..bf9d5a6e3f0 100644 --- a/scene/main/timer.cpp +++ b/scene/main/timer.cpp @@ -146,7 +146,7 @@ void Timer::set_ignore_time_scale(bool p_ignore) { ignore_time_scale = p_ignore; } -bool Timer::get_ignore_time_scale() { +bool Timer::is_ignoring_time_scale() { return ignore_time_scale; } @@ -223,7 +223,7 @@ void Timer::_bind_methods() { ClassDB::bind_method(D_METHOD("is_paused"), &Timer::is_paused); ClassDB::bind_method(D_METHOD("set_ignore_time_scale", "ignore"), &Timer::set_ignore_time_scale); - ClassDB::bind_method(D_METHOD("get_ignore_time_scale"), &Timer::get_ignore_time_scale); + ClassDB::bind_method(D_METHOD("is_ignoring_time_scale"), &Timer::is_ignoring_time_scale); ClassDB::bind_method(D_METHOD("is_stopped"), &Timer::is_stopped); @@ -239,7 +239,7 @@ void Timer::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "is_one_shot"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autostart"), "set_autostart", "has_autostart"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "paused", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_paused", "is_paused"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ignore_time_scale"), "set_ignore_time_scale", "get_ignore_time_scale"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ignore_time_scale"), "set_ignore_time_scale", "is_ignoring_time_scale"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_left", PROPERTY_HINT_NONE, "suffix:s", PROPERTY_USAGE_NONE), "", "get_time_left"); BIND_ENUM_CONSTANT(TIMER_PROCESS_PHYSICS); diff --git a/scene/main/timer.h b/scene/main/timer.h index de07343b567..43e29591627 100644 --- a/scene/main/timer.h +++ b/scene/main/timer.h @@ -71,7 +71,7 @@ public: bool is_paused() const; void set_ignore_time_scale(bool p_ignore); - bool get_ignore_time_scale(); + bool is_ignoring_time_scale(); bool is_stopped() const;