-
Notifications
You must be signed in to change notification settings - Fork 1
/
Main.gd
26 lines (19 loc) · 834 Bytes
/
Main.gd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
extends Node3D
@onready var suzannes_scene = $SuzannesScene
func _ready() -> void:
if QualitySettings.current_setting_idx == -1:
QualitySettings.current_setting_idx = 0
QualitySettings.current_quality_settings.apply_settings(get_viewport(), suzannes_scene.world_environment.environment)
func _unhandled_key_input(event: InputEvent) -> void:
if event.is_pressed():
if event.keycode == KEY_1:
QualitySettings.current_setting_idx = 0
apply_quality_setting()
elif event.keycode == KEY_2:
QualitySettings.current_setting_idx = 1
apply_quality_setting()
elif event.keycode == KEY_3:
QualitySettings.current_setting_idx = 2
apply_quality_setting()
func apply_quality_setting() -> void:
QualitySettings.current_quality_settings.apply_settings(get_viewport(), suzannes_scene.world_environment.environment)