paratate/objects/bosses/tesu.gd
2025-12-14 13:05:57 -05:00

14 lines
405 B
GDScript

extends Node2D
var health = 100.0
func _on_area_2d_area_entered(area: Area2D) -> void:
%HurtSound.play()
health -= 0.25
print(%Movements.current_animation)
if health < 50.0 && health >= 25.0 && %Movements.current_animation != "midway_left":
%Movements.play("midway_left")
if health < 25.0 && %Movements.current_animation != "pinch":
%Movements.play("pinch")
%AnimationPlayer.play("hurt")