ft: drag to move

This commit is contained in:
2026-03-15 16:51:01 +01:00
parent 6239bbdd73
commit c20985ac91
5 changed files with 10 additions and 20 deletions

View File

@@ -37,3 +37,8 @@ func play_sprite(anim: String) -> void:
self.sprite.play(anim)
if "wrapper" in self:
self.wrapper.play_sprite(anim)
func _on_collision_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void:
if player:
if player.updating_target and event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT:
player.target = self.collision