using Godot; using System; public partial class Teleport : Area2D { [Signal] public delegate void TeleportTriggeredEventHandler(); [Export] public Node2D To; private void OnPlayerEntered(Node2D body) { if (body is not Player player) return; player.GlobalPosition = To.GlobalPosition; EmitSignal(SignalName.TeleportTriggered); } }