Adds new animations

This commit is contained in:
2024-10-06 19:38:16 +02:00
parent 0f6f75ea44
commit d92c87bf80
69 changed files with 930 additions and 164 deletions

View File

@@ -1,21 +1,25 @@
extends Node2D
signal enemy_attacked
@export var color:Color
func button_pressed():
queue_free()
$AnimatedSprite2D.play("defeated_3")
func _on_first_timer_timeout() -> void:
scale = Vector2(1.2,1.2)
func _process(delta: float) -> void:
$AnimatedSprite2D.modulate=color
func _on_second_timer_timeout() -> void:
scale = Vector2(1.4,1.4)
func _ready() -> void:
$AnimatedSprite2D.play("new_animation")
$AnimatedSprite2D.play("attack")
func flip_animation():
scale.y = -scale.y
func _on_animated_sprite_2d_animation_finished() -> void:
enemy_attacked.emit()
if($AnimatedSprite2D.animation == "attack"):
enemy_attacked.emit()
queue_free()