aboutsummaryrefslogtreecommitdiff
path: root/scene/animation/animation_player.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2015-09-10 00:10:54 -0300
committerJuan Linietsky2015-09-10 00:10:54 -0300
commit0fb7b5aa0c023d60880d259e70f7641152460aa6 (patch)
tree86f6432457a0cbf14a9994b5e0d23dbdad12421b /scene/animation/animation_player.cpp
parentb0aa49accbd7e45dae38f1bd43b0fbdd11714211 (diff)
downloadgodot-0fb7b5aa0c023d60880d259e70f7641152460aa6.tar.gz
godot-0fb7b5aa0c023d60880d259e70f7641152460aa6.tar.zst
godot-0fb7b5aa0c023d60880d259e70f7641152460aa6.zip
HTML5 exporter Improvements
-Better template handling -Voice support -Stream support
Diffstat (limited to 'scene/animation/animation_player.cpp')
-rw-r--r--scene/animation/animation_player.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index f8b58b5cb..c2ea1c8bb 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -857,6 +857,11 @@ void AnimationPlayer::clear_queue() {
queued.clear();
};
+void AnimationPlayer::play_backwards(const StringName& p_name,float p_custom_blend) {
+
+ play(p_name,p_custom_blend,-1,true);
+}
+
void AnimationPlayer::play(const StringName& p_name, float p_custom_blend, float p_custom_scale,bool p_from_end) {
//printf("animation is %ls\n", String(p_name).c_str());
@@ -1216,6 +1221,7 @@ void AnimationPlayer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_default_blend_time"),&AnimationPlayer::get_default_blend_time);
ObjectTypeDB::bind_method(_MD("play","name","custom_blend","custom_speed","from_end"),&AnimationPlayer::play,DEFVAL(""),DEFVAL(-1),DEFVAL(1.0),DEFVAL(false));
+ ObjectTypeDB::bind_method(_MD("play_backwards","name","custom_blend"),&AnimationPlayer::play_backwards,DEFVAL(""),DEFVAL(-1));
ObjectTypeDB::bind_method(_MD("stop","reset"),&AnimationPlayer::stop,DEFVAL(true));
ObjectTypeDB::bind_method(_MD("stop_all"),&AnimationPlayer::stop_all);
ObjectTypeDB::bind_method(_MD("is_playing"),&AnimationPlayer::is_playing);