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, "state", "")
17 debug.stats.add_property(player, "velocity", "length")
18 debug.stats.add_property(player, "idle_time", "round")
21 func _input(event: InputEvent) -> void:
22 if event.is_action_pressed("left_click"):
23 Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
24 elif event.is_action_pressed("ui_cancel"):
25 if Input.mouse_mode == Input.MOUSE_MODE_VISIBLE:
28 Input.mouse_mode = Input.MOUSE_MODE_VISIBLE