fx: input extracted to own node
This commit is contained in:
1 parent
0af538ff3f
commit
f4e5d13cf8
5 files changed
+41
-25
No files matched your search
@@ -40,5 +40,5 @@ func play_sprite(anim: String) -> void:
|
||||
|
||||
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
|
||||
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT:
|
||||
player.set_target(self.collision)
|
||||