5 @onready var player: Player = %Player
6 @onready var model: PlayerModel = %Model
7 @onready var debug: CanvasLayer = %debug
8 @onready var version: String = ProjectSettings.get_setting("application/config/version")
11 func _ready() -> void:
12 debug.draw.add_vector(player, "velocity", 1, 1, Color(0,1,0,1))
13 #_debug.draw.add_vector(model, "floor_normal", 1, 1, Color(0, 0, 1, 1))
14 #_debug.draw.add_vector(model, "last_movement_direction", 1, 1, Color(1,0,0,1))
16 debug.stats.add_property(self, "version", "")
17 debug.stats.add_property(player, "velocity", "length")
18 #debug.stats.add_property(model, "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