Files
Embodiment/Levels/Interactables/Teleporter.gd

11 lines
243 B
GDScript

extends Area2D
export var x_location: int
export var y_location: int
func _on_teleporter_body_entered(body: Node) -> void:
if body.is_in_group('player'):
body.set_deferred('position', Vector2(x_location, y_location))
return