Add a toggle button for the debug panel and clean up some comments
This commit is contained in:
@ -45,12 +45,12 @@ extends CharacterBody3D
|
||||
@export var RIGHT : String = "ui_right"
|
||||
@export var FORWARD : String = "ui_up"
|
||||
@export var BACKWARD : String = "ui_down"
|
||||
## By default this does not pause the game, but that can be set in _process.
|
||||
## By default this does not pause the game, but that can be changed in _process.
|
||||
@export var PAUSE : String = "ui_cancel"
|
||||
@export var CROUCH : String = "crouch"
|
||||
@export var SPRINT : String = "sprint"
|
||||
|
||||
# Uncomment if you want full controller support
|
||||
# Uncomment if you want controller support
|
||||
#@export var controller_sensitivity : float = 0.035
|
||||
#@export var LOOK_LEFT : String = "look_left"
|
||||
#@export var LOOK_RIGHT : String = "look_right"
|
||||
@ -375,7 +375,13 @@ func _process(delta):
|
||||
#get_tree().paused = false
|
||||
|
||||
|
||||
func _unhandled_input(event):
|
||||
func _unhandled_input(event : InputEvent):
|
||||
if event is InputEventMouseMotion and Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
|
||||
mouseInput.x += event.relative.x
|
||||
mouseInput.y += event.relative.y
|
||||
# Toggle debug menu
|
||||
elif event is InputEventKey:
|
||||
if event.is_released():
|
||||
# Where we're going, we don't need InputMap
|
||||
if event.keycode == 4194338: # F7
|
||||
$UserInterface/DebugPanel.visible = !$UserInterface/DebugPanel.visible
|
||||
|
Reference in New Issue
Block a user