diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-13 19:36:04 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-13 19:36:04 -0300 |
commit | 00ec16e3f3a98339ec7462675fa41b3dd240861b (patch) | |
tree | bf2b76e70583a0b94ace525cc612b267b3d9d488 /scene | |
parent | a97551902e24ef1ac8fd709d77a5195b73c6c1ae (diff) |
renamed tween animationplayer scale functions to speed_scale
Diffstat (limited to 'scene')
-rw-r--r-- | scene/animation/animation_player.cpp | 10 | ||||
-rw-r--r-- | scene/animation/animation_player.h | 4 | ||||
-rw-r--r-- | scene/animation/tween.cpp | 10 | ||||
-rw-r--r-- | scene/animation/tween.h | 4 |
4 files changed, 14 insertions, 14 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index fa0700584c..7fc2234d86 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -36,7 +36,7 @@ bool AnimationPlayer::_set(const StringName& p_name, const Variant& p_value) { String name=p_name; if (p_name==SceneStringNames::get_singleton()->playback_speed || p_name==SceneStringNames::get_singleton()->speed) { //bw compatibility - set_speed(p_value); + set_speed_scale(p_value); } else if (p_name==SceneStringNames::get_singleton()->playback_active) { set_active(p_value); @@ -1082,13 +1082,13 @@ void AnimationPlayer::stop_all() { } -void AnimationPlayer::set_speed(float p_speed) { +void AnimationPlayer::set_speed_scale(float p_speed) { speed_scale=p_speed; } -float AnimationPlayer::get_speed() const { +float AnimationPlayer::get_speed_scale() const { return speed_scale; } @@ -1323,8 +1323,8 @@ void AnimationPlayer::_bind_methods() { ClassDB::bind_method(_MD("set_active","active"),&AnimationPlayer::set_active); ClassDB::bind_method(_MD("is_active"),&AnimationPlayer::is_active); - ClassDB::bind_method(_MD("set_speed","speed"),&AnimationPlayer::set_speed); - ClassDB::bind_method(_MD("get_speed"),&AnimationPlayer::get_speed); + ClassDB::bind_method(_MD("set_speed_scale","speed"),&AnimationPlayer::set_speed_scale); + ClassDB::bind_method(_MD("get_speed_scale"),&AnimationPlayer::get_speed_scale); ClassDB::bind_method(_MD("set_autoplay","name"),&AnimationPlayer::set_autoplay); ClassDB::bind_method(_MD("get_autoplay"),&AnimationPlayer::get_autoplay); diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h index 94955bec60..41bae6c928 100644 --- a/scene/animation/animation_player.h +++ b/scene/animation/animation_player.h @@ -271,8 +271,8 @@ public: bool is_active() const; bool is_valid() const; - void set_speed(float p_speed); - float get_speed() const; + void set_speed_scale(float p_speed); + float get_speed_scale() const; void set_autoplay(const String& pname); String get_autoplay() const; diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp index 62a8286041..0916119db3 100644 --- a/scene/animation/tween.cpp +++ b/scene/animation/tween.cpp @@ -109,7 +109,7 @@ bool Tween::_set(const StringName& p_name, const Variant& p_value) { String name=p_name; if (name=="playback/speed" || name=="speed") { //bw compatibility - set_speed(p_value); + set_speed_scale(p_value); } else if (name=="playback/active") { set_active(p_value); @@ -192,8 +192,8 @@ void Tween::_bind_methods() { ClassDB::bind_method(_MD("is_repeat"),&Tween::is_repeat ); ClassDB::bind_method(_MD("set_repeat","repeat"),&Tween::set_repeat ); - ClassDB::bind_method(_MD("set_speed","speed"),&Tween::set_speed); - ClassDB::bind_method(_MD("get_speed"),&Tween::get_speed); + ClassDB::bind_method(_MD("set_speed_scale","speed"),&Tween::set_speed_scale); + ClassDB::bind_method(_MD("get_speed_scale"),&Tween::get_speed_scale); ClassDB::bind_method(_MD("set_tween_process_mode","mode"),&Tween::set_tween_process_mode); ClassDB::bind_method(_MD("get_tween_process_mode"),&Tween::get_tween_process_mode); @@ -697,12 +697,12 @@ void Tween::set_repeat(bool p_repeat) { repeat = p_repeat; } -void Tween::set_speed(float p_speed) { +void Tween::set_speed_scale(float p_speed) { speed_scale=p_speed; } -float Tween::get_speed() const { +float Tween::get_speed_scale() const { return speed_scale; } diff --git a/scene/animation/tween.h b/scene/animation/tween.h index 12c7aa62a1..07c2e90da2 100644 --- a/scene/animation/tween.h +++ b/scene/animation/tween.h @@ -165,8 +165,8 @@ public: void set_tween_process_mode(TweenProcessMode p_mode); TweenProcessMode get_tween_process_mode() const; - void set_speed(float p_speed); - float get_speed() const; + void set_speed_scale(float p_speed); + float get_speed_scale() const; bool start(); bool reset(Object *p_node, String p_key); |