Skip to content

Commit 8d2bc64

Browse files
committed
Update demo scripts
1 parent e1e58c5 commit 8d2bc64

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

project/demo/src/Player.gd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ extends CharacterBody3D
1818
$CollisionShapeRay.disabled = ! collision_enabled
1919

2020

21-
func _physics_process(delta):
21+
func _physics_process(delta) -> void:
2222
var direction: Vector3 = get_camera_relative_input()
2323
var h_veloc: Vector2 = Vector2(direction.x, direction.z) * MOVE_SPEED
2424
velocity.x = h_veloc.x
@@ -56,7 +56,7 @@ func get_camera_relative_input() -> Vector3:
5656
return input_dir
5757

5858

59-
func _input(event: InputEvent):
59+
func _input(event: InputEvent) -> void:
6060
if event is InputEventMouseButton and event.pressed:
6161
if event.button_index == MOUSE_BUTTON_WHEEL_UP:
6262
MOVE_SPEED = clamp(MOVE_SPEED + 5, 0, 9999)

project/demo/src/UI.gd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ func _process(delta) -> void:
2020
func _unhandled_key_input(event: InputEvent) -> void:
2121
if event is InputEventKey and event.pressed:
2222
match event.keycode:
23+
KEY_F8:
24+
get_tree().quit()
2325
KEY_F10:
2426
var vp = get_viewport()
2527
vp.debug_draw = (vp.debug_draw + 1 ) % 4

0 commit comments

Comments
 (0)