extends Area2D signal pressed var is_pressed: bool = false func _on_body_entered(body): if body is Player and not is_pressed: is_pressed = true $AnimatedSprite2D.play("pressed") emit_signal("pressed")