one-dimensional vertical slice
This commit is contained in:
parent
548a23d0e9
commit
3607ca7e2e
42 changed files with 692 additions and 2 deletions
14
objects/bosses/tesu.gd
Normal file
14
objects/bosses/tesu.gd
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
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")
|
||||
Loading…
Add table
Add a link
Reference in a new issue