This commit is contained in:
zoe 2021-10-18 11:27:04 +02:00
parent e08c2c3ef2
commit 7b67b3aef6
24 changed files with 238 additions and 167 deletions

View file

@ -1,4 +1,17 @@
extends Sprite
func animate():
func _ready() -> void:
$AudioStreamPlayer2D.pitch_scale = rand_range(0.5, 1.5)
func animate_hit():
$AnimationPlayer.play("Spring")
func animate_spawn(delay):
var timer = Timer.new()
timer.connect("timeout", self, "play_spawn_animation")
timer.one_shot = true
add_child(timer)
timer.start(delay * 0.02)
func play_spawn_animation():
$AnimationPlayer.play("Spawn")