mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-16 13:30:07 +01:00
Improve style in many demos (#1263)
This commit is contained in:
@@ -26,12 +26,12 @@ func _process(_delta: float) -> void:
|
||||
move_and_slide()
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed(&"move_left"):
|
||||
func _input(input_event: InputEvent) -> void:
|
||||
if input_event.is_action_pressed(&"move_left"):
|
||||
sprite.rotation = PI / 2
|
||||
elif event.is_action_pressed(&"move_right"):
|
||||
elif input_event.is_action_pressed(&"move_right"):
|
||||
sprite.rotation = -PI / 2
|
||||
elif event.is_action_pressed(&"move_up"):
|
||||
elif input_event.is_action_pressed(&"move_up"):
|
||||
sprite.rotation = PI
|
||||
elif event.is_action_pressed(&"move_down"):
|
||||
elif input_event.is_action_pressed(&"move_down"):
|
||||
sprite.rotation = 0.0
|
||||
|
||||
Reference in New Issue
Block a user