12345678910 |
- extends CharacterBody2D
- class_name BaseBox
- func _input(event):
- if event is InputEventMouseButton and event.pressed:
- var player = get_node("../Player")
- if player.get_child(0).get_rect().has_point(to_local(event.position)):
- set_deferred("global_position", player.global_position)
- player.set_deferred("global_position", global_position)
|