File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ func _process(delta) -> void:
2020func _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
You can’t perform that action at this time.
0 commit comments