1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

[Core] Align naming and args of (SceneTree)Timer time scale methods

Renamed `get_ignore_time_scale` to `is_ignoring_time_scale` following general naming standards.
This commit is contained in:
AThousandShips
2024-12-22 15:20:27 -05:00
parent 0f95e9f8e6
commit 8d1a3e2a76
5 changed files with 8 additions and 8 deletions

View File

@@ -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] 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. [b]Note:[/b] This property does nothing when the timer is running in the editor.
</member> </member>
<member name="ignore_time_scale" type="bool" setter="set_ignore_time_scale" getter="get_ignore_time_scale" default="false"> <member name="ignore_time_scale" type="bool" setter="set_ignore_time_scale" getter="is_ignoring_time_scale" default="false">
If [code]true[/code], the timer will ignore [member Engine.time_scale] and update with the real, elapsed time. If [code]true[/code], the timer will ignore [member Engine.time_scale] and update with the real, elapsed time.
</member> </member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot" default="false"> <member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot" default="false">

View File

@@ -94,7 +94,7 @@ void SceneTreeTimer::set_ignore_time_scale(bool p_ignore) {
ignore_time_scale = p_ignore; ignore_time_scale = p_ignore;
} }
bool SceneTreeTimer::is_ignore_time_scale() { bool SceneTreeTimer::is_ignoring_time_scale() {
return ignore_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(); 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(); time_left -= Engine::get_singleton()->get_process_step();
} else { } else {
time_left -= p_delta; time_left -= p_delta;

View File

@@ -74,7 +74,7 @@ public:
bool is_process_in_physics(); bool is_process_in_physics();
void set_ignore_time_scale(bool p_ignore); void set_ignore_time_scale(bool p_ignore);
bool is_ignore_time_scale(); bool is_ignoring_time_scale();
void release_connections(); void release_connections();

View File

@@ -146,7 +146,7 @@ void Timer::set_ignore_time_scale(bool p_ignore) {
ignore_time_scale = p_ignore; ignore_time_scale = p_ignore;
} }
bool Timer::get_ignore_time_scale() { bool Timer::is_ignoring_time_scale() {
return ignore_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("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("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); 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, "one_shot"), "set_one_shot", "is_one_shot");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autostart"), "set_autostart", "has_autostart"); 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, "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"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_left", PROPERTY_HINT_NONE, "suffix:s", PROPERTY_USAGE_NONE), "", "get_time_left");
BIND_ENUM_CONSTANT(TIMER_PROCESS_PHYSICS); BIND_ENUM_CONSTANT(TIMER_PROCESS_PHYSICS);

View File

@@ -71,7 +71,7 @@ public:
bool is_paused() const; bool is_paused() const;
void set_ignore_time_scale(bool p_ignore); void set_ignore_time_scale(bool p_ignore);
bool get_ignore_time_scale(); bool is_ignoring_time_scale();
bool is_stopped() const; bool is_stopped() const;