Improve style in many demos (#1263)

This commit is contained in:
Aaron Franke
2025-10-11 05:03:59 -07:00
committed by GitHub
parent 0ae09b7e5a
commit 520b4a7870
197 changed files with 904 additions and 766 deletions

View File

@@ -31,12 +31,12 @@ func _process(delta: float) -> void:
r_pos = Vector2.ZERO
func _input(event: InputEvent) -> void:
if event is InputEventMouseMotion:
func _input(input_event: InputEvent) -> void:
if input_event is InputEventMouseMotion:
# Use `screen_relative` to make sensitivity independent of the viewport resolution.
r_pos = -event.screen_relative * MOUSE_SENSITIVITY
r_pos = -input_event.screen_relative * MOUSE_SENSITIVITY
if event.is_action(&"ui_cancel") and event.is_pressed() and not event.is_echo():
if input_event.is_action(&"ui_cancel") and input_event.is_pressed() and not input_event.is_echo():
if state == State.GRAB:
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
state = State.MENU