4 @onready var player = $player
7 func _input(event: InputEvent) -> void:
8 if event.is_action_pressed("left_click"):
9 Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
10 elif event.is_action_pressed("ui_cancel"):
11 if Input.mouse_mode == Input.MOUSE_MODE_VISIBLE:
14 Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
17 func _on_player_camera_lockon() -> void:
18 # Pass everything that's part of the lockon group to the player
19 # within a certain radius
20 var arr := get_tree().get_nodes_in_group("player-lockon")
21 player.set_camera_lockon(arr)