5 @onready var _player: Player = %Player
6 @onready var _debug: CanvasLayer = %debug
7 @onready var _version: String = ProjectSettings.get_setting("application/config/version")
10 func _ready() -> void:
11 _debug.draw.add_vector(_player, "velocity", 1, 1, Color(0,1,0,1))
12 _debug.draw.add_vector(_player, "_floor_normal", 1, 1, Color(0, 0, 1, 1))
13 _debug.draw.add_vector(_player, "_last_movement_direction", 1, 1, Color(1,0,0,1))
15 _debug.stats.add_property(self, "_version", "")
16 _debug.stats.add_property(_player, "velocity", "length")
17 _debug.stats.add_property(_player, "_idle_time", "round")
20 func _input(event: InputEvent) -> void:
21 if event.is_action_pressed("left_click"):
22 Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
23 elif event.is_action_pressed("ui_cancel"):
24 if Input.mouse_mode == Input.MOUSE_MODE_VISIBLE:
27 Input.mouse_mode = Input.MOUSE_MODE_VISIBLE