24 lines
449 B
GDScript
24 lines
449 B
GDScript
extends Node2D
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onready var timer = $Timer;
|
|
onready var player = $AnimationPlayer;
|
|
onready var birdAnimation = $BirdsAnimation / BirdsAnimation;
|
|
onready var animationContainer = $BirdsAnimation;
|
|
|
|
func Init():
|
|
player.play("BirdsAnimation");
|
|
|
|
func _on_AnimationPlayer_animation_finished(_anim_name):
|
|
animationContainer.position.x = - 135;
|
|
birdAnimation.frame = 0;
|
|
timer.start(55);
|
|
|
|
func _on_Timer_timeout():
|
|
player.play("BirdsAnimation");
|