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

@@ -1,9 +1,11 @@
extends CharacterBody2D
var movement_speed := 200.0
@onready var navigation_agent: NavigationAgent2D = $NavigationAgent2D
func _ready() -> void:
# These values need to be adjusted for the actor's speed
# and the navigation layout.
@@ -14,8 +16,8 @@ func _ready() -> void:
# The "click" event is a custom input action defined in
# Project > Project Settings > Input Map tab.
func _unhandled_input(event: InputEvent) -> void:
if not event.is_action_pressed(&"click"):
func _unhandled_input(input_event: InputEvent) -> void:
if not input_event.is_action_pressed(&"click"):
return
set_movement_target(get_global_mouse_position())