0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Godot 4.2] AnimationMixer.animation_finished は中止時に発火しない

Posted at

検証用コード

extends AnimationPlayer


func _ready():
	play("new_animation")


func _on_animation_finished(anim_name):
	print_debug("finished: %s" % anim_name)


func _on_timer_timeout():
	stop()
	print_debug("stop!")

AnimationMixer.animation_finished_on_animation_finished() に接続しています。
また、 Timer にアニメーションの再生時間より短い時間を設定しておき、 timeout シグナルを _on_timer_timeout()に接続しています。

出力

stop!
   At: res://my_animation_player.gd:14:_on_timer_timeout()
--- Debugging process stopped ---

確かにまあ、 "finish" ってやり遂げる的な意味合いが含まれてるらしいですからね……。

参考文献

AnimationMixer — Godot Engine (4.2) documentation in English
AnimationPlayer — Godot Engine (4.2) documentation in English

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?