Files
National-Day/scene/code/checkpoint.gd
T
2026-10-07 17:58:02 +08:00

23 lines
518 B
GDScript

extends Area2D
@onready var animated = $Animation_flag
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
animated.play("NULL")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_body_entered(body: Node2D) -> void:
if body.is_in_group("Player"):
animated.play("ROLL")
body.respawn_position = global_position
await animated.animation_finished
animated.play("YES")
monitoring = false