[gd_scene load_steps=23 format=3 uid="uid://cd63barv73rfx"] [ext_resource type="Texture2D" uid="uid://d3ewjumh0b0g6" path="res://logic-scenes/main menu/logo.png" id="1_61qpo"] [ext_resource type="Texture2D" uid="uid://ds1n0xhxqlp4b" path="res://base-environments/youth_room/shaders/universe_noise.png" id="1_t34p3"] [ext_resource type="Texture2D" uid="uid://sfo05h6uah7b" path="res://import/interface-elements/USK_12.svg" id="2_ncfee"] [ext_resource type="Texture2D" uid="uid://bdyg065h8vcdi" path="res://base-environments/youth_room/shaders/starlight-textures.png" id="2_s1yf2"] [ext_resource type="Texture2D" uid="uid://buo4ntxw1vofu" path="res://addons/input_prompts/icons/keyboard/w.png" id="4_8e30h"] [ext_resource type="Script" uid="uid://bbs1u7ojno7xo" path="res://addons/input_prompts/action_prompt/action_prompt.gd" id="5_6w5b4"] [ext_resource type="Texture2D" uid="uid://yakqusko3p3h" path="res://addons/input_prompts/icons/keyboard/a.png" id="7_g425y"] [ext_resource type="Texture2D" uid="uid://b0kuadlp4jw6j" path="res://addons/input_prompts/icons/keyboard/d.png" id="8_kj67n"] [ext_resource type="Texture2D" uid="uid://bwhf0tx67yj7a" path="res://addons/input_prompts/icons/keyboard/s.png" id="9_xo70c"] [sub_resource type="GDScript" id="GDScript_t34p3"] script/source = "extends Node3D var room = preload(\"res://base-environments/youth_room/youth_room.tscn\") var loaded_room: RoomTemplate func _ready() -> void: load_room() State.settings_initialised = true State.show_content_notes = false State.text_language = 1 func load_room(): for child in %Room.get_children(): child.queue_free() loaded_room = room.instantiate() %Room.add_child(loaded_room) func _on_start_button_pressed(): State.active_save_game = SaveGame.new() var vis_tween = get_tree().create_tween() vis_tween.tween_property(%Menu, \"modulate\", Color(1,1,1,0), .3) await vis_tween.finished %Menu.visible = false %Menu.mouse_filter = Control.MouseFilter.MOUSE_FILTER_PASS loaded_room.start_room() func _process(delta: float) -> void: if Input.is_action_just_pressed(\"reset_demo\"): _on_reset() func _on_reset(): load_room() %Menu.modulate = Color.WHITE %Menu.mouse_filter = Control.MouseFilter.MOUSE_FILTER_STOP %Menu.visible = true func _on_cn_box_toggled(toggled_on: bool) -> void: State.show_content_notes = toggled_on func _on_motion_box_toggled(toggled_on: bool) -> void: State.reduce_motion = toggled_on func _on_option_button_item_selected(index: int) -> void: match index: 0: State.text_language = 1 1: State.text_language = 2 " [sub_resource type="Shader" id="Shader_duh8f"] code = "shader_type canvas_item; render_mode blend_premul_alpha; uniform float nebula_brightness = 4; uniform vec2 nebula_scale = vec2(1.5); uniform sampler2D starlight_noise: repeat_enable; uniform sampler2D starlight_textures; uniform float rotation_speed = 0.02; uniform vec2 rotation_pivot = vec2(.8); uniform vec2 drift_compensation = vec2(0.1, -0.2); uniform float noise_strength = 0.2; // https://gist.github.com/ayamflow/c06bc0c8a64f985dd431bd0ac5b557cd vec2 rotateUV(vec2 uv, vec2 pivot, float rotation) { return vec2( cos(rotation) * (uv.x - pivot.x) + sin(rotation) * (uv.y - pivot.y) + pivot.x, cos(rotation) * (uv.y - pivot.y) - sin(rotation) * (uv.x - pivot.x) + pivot.y ); } //clamp(, .0, 1.0 void fragment() { COLOR *= vec4(.0, texture(starlight_textures,fract(UV*2.0)).x * 2.0*pow(max(sin(TIME + 10.0 * texture(starlight_textures,UV).y), .0), 5.0), texture(starlight_textures, clamp( UV / nebula_scale + drift_compensation + 1.0 * texture(starlight_noise, rotateUV( UV / nebula_scale + noise_strength * texture(starlight_noise, rotateUV(UV, -rotation_pivot, TIME*rotation_speed)).yz, rotation_pivot, TIME*rotation_speed) ).xz, .0, 1.0)) .z * nebula_brightness, clamp(pow(COLOR.x * 2.5 - (texture(starlight_noise, UV*2.0+TIME*.02).x + 0.8), 1.5), .0, 1.0) ) * COLOR.w; } " [sub_resource type="ShaderMaterial" id="ShaderMaterial_k41g6"] shader = SubResource("Shader_duh8f") shader_parameter/nebula_brightness = 2.4 shader_parameter/nebula_scale = Vector2(1.3, 1.6) shader_parameter/starlight_noise = ExtResource("1_t34p3") shader_parameter/starlight_textures = ExtResource("2_s1yf2") shader_parameter/rotation_speed = 0.02 shader_parameter/rotation_pivot = Vector2(0.8, 0.8) shader_parameter/drift_compensation = Vector2(0.1, -0.2) shader_parameter/noise_strength = 0.2 [sub_resource type="Gradient" id="Gradient_7nxov"] interpolation_color_space = 2 colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 0) [sub_resource type="GradientTexture2D" id="GradientTexture2D_jirkf"] gradient = SubResource("Gradient_7nxov") width = 2048 height = 1536 fill = 1 fill_from = Vector2(0.538462, 0.491453) fill_to = Vector2(1.3, -0.3) [sub_resource type="InputEventKey" id="InputEventKey_t34p3"] device = -1 physical_keycode = 87 unicode = 119 [sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_s1yf2"] device = -1 axis = 1 axis_value = -1.0 [sub_resource type="InputEventKey" id="InputEventKey_g425y"] device = -1 physical_keycode = 65 unicode = 97 [sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_kj67n"] device = -1 axis_value = -1.0 [sub_resource type="InputEventKey" id="InputEventKey_xo70c"] device = -1 physical_keycode = 68 unicode = 100 [sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_k41g6"] device = -1 axis_value = 1.0 [sub_resource type="InputEventKey" id="InputEventKey_jirkf"] device = -1 physical_keycode = 83 unicode = 115 [sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_kt5p7"] device = -1 axis = 1 axis_value = 1.0 [node name="DemoMain" type="Node3D"] script = SubResource("GDScript_t34p3") [node name="Room" type="Node3D" parent="."] unique_name_in_owner = true [node name="Menu" type="Control" parent="."] unique_name_in_owner = true layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 [node name="Panel" type="Panel" parent="Menu"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 [node name="TextureRect3" type="TextureRect" parent="Menu/Panel"] material = SubResource("ShaderMaterial_k41g6") layout_mode = 0 offset_left = 2073.0 offset_top = 1290.0 offset_right = 4353.0 offset_bottom = 3000.0 rotation = -3.14159 texture = SubResource("GradientTexture2D_jirkf") [node name="TextureRect" type="TextureRect" parent="Menu/Panel"] layout_mode = 1 anchors_preset = 5 anchor_left = 0.5 anchor_right = 0.5 offset_left = -496.0 offset_top = 128.0 offset_right = 528.0 offset_bottom = 1152.0 grow_horizontal = 2 scale = Vector2(0.5, 0.5) texture = ExtResource("1_61qpo") [node name="TextureRect2" type="TextureRect" parent="Menu/Panel"] layout_mode = 1 anchors_preset = 3 anchor_left = 1.0 anchor_top = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 offset_left = -395.0 offset_top = -447.0 offset_right = 1011.0 offset_bottom = 959.0 grow_horizontal = 0 grow_vertical = 0 scale = Vector2(0.2, 0.2) texture = ExtResource("2_ncfee") [node name="Label" type="Label" parent="Menu/Panel/TextureRect2"] layout_mode = 1 anchors_preset = 7 anchor_left = 0.5 anchor_top = 1.0 anchor_right = 0.5 anchor_bottom = 1.0 offset_left = -988.0 offset_top = 99.0002 offset_right = -590.0 offset_bottom = 187.0 grow_horizontal = 2 grow_vertical = 0 scale = Vector2(5, 5) text = "*Als Messe-Demo geprüft. Entspricht angestrebtem finalen Rating." horizontal_alignment = 1 autowrap_mode = 2 [node name="PressStart" type="Button" parent="Menu"] layout_mode = 1 anchors_preset = 7 anchor_left = 0.5 anchor_top = 1.0 anchor_right = 0.5 anchor_bottom = 1.0 offset_left = -476.0 offset_top = -425.0 offset_right = -228.0 offset_bottom = -378.0 grow_horizontal = 2 grow_vertical = 0 scale = Vector2(2, 2) text = "Start the Demo!" [node name="VBoxContainer" type="VBoxContainer" parent="Menu"] layout_mode = 0 offset_left = 43.0 offset_top = 42.0 offset_right = 280.0 offset_bottom = 260.0 [node name="Label" type="Label" parent="Menu/VBoxContainer"] layout_mode = 2 theme_type_variation = &"HeaderMedium" text = "Accessibility" [node name="CNBox" type="CheckBox" parent="Menu/VBoxContainer"] layout_mode = 2 text = "show Content Notes" [node name="MotionBox" type="CheckBox" parent="Menu/VBoxContainer"] layout_mode = 2 text = "reduce Motion" [node name="Label2" type="Label" parent="Menu/VBoxContainer"] layout_mode = 2 theme_type_variation = &"HeaderMedium" text = "Text Language" [node name="OptionButton" type="OptionButton" parent="Menu/VBoxContainer"] layout_mode = 2 selected = 0 item_count = 2 popup/item_0/text = "englisch" popup/item_0/id = 0 popup/item_1/text = "deutsch" popup/item_1/id = 1 [node name="Control" type="Control" parent="Menu"] layout_mode = 1 anchors_preset = 2 anchor_top = 1.0 anchor_bottom = 1.0 offset_top = -40.0 offset_right = 40.0 grow_vertical = 0 [node name="ActionPrompt" type="TextureRect" parent="Menu/Control"] texture_filter = 1 layout_mode = 0 offset_left = 134.0 offset_top = -282.0 offset_right = 234.0 offset_bottom = -182.0 texture = ExtResource("4_8e30h") stretch_mode = 5 script = ExtResource("5_6w5b4") action = "player_forwards" icon = 4 events = Array[InputEvent]([SubResource("InputEventKey_t34p3"), SubResource("InputEventJoypadMotion_s1yf2")]) metadata/_custom_type_script = "uid://bbs1u7ojno7xo" [node name="ActionPrompt2" type="TextureRect" parent="Menu/Control"] texture_filter = 1 layout_mode = 0 offset_left = 70.0 offset_top = -187.0 offset_right = 170.0 offset_bottom = -87.0 texture = ExtResource("7_g425y") stretch_mode = 5 script = ExtResource("5_6w5b4") action = "player_left" icon = 4 events = Array[InputEvent]([SubResource("InputEventKey_g425y"), SubResource("InputEventJoypadMotion_kj67n")]) metadata/_custom_type_script = "uid://bbs1u7ojno7xo" [node name="ActionPrompt4" type="TextureRect" parent="Menu/Control"] texture_filter = 1 layout_mode = 0 offset_left = 247.0 offset_top = -187.0 offset_right = 347.0 offset_bottom = -87.0 texture = ExtResource("8_kj67n") stretch_mode = 5 script = ExtResource("5_6w5b4") action = "player_right" icon = 4 events = Array[InputEvent]([SubResource("InputEventKey_xo70c"), SubResource("InputEventJoypadMotion_k41g6")]) metadata/_custom_type_script = "uid://bbs1u7ojno7xo" [node name="ActionPrompt3" type="TextureRect" parent="Menu/Control"] texture_filter = 1 layout_mode = 0 offset_left = 158.0 offset_top = -187.0 offset_right = 258.0 offset_bottom = -87.0 texture = ExtResource("9_xo70c") stretch_mode = 5 script = ExtResource("5_6w5b4") action = "player_backwards" icon = 4 events = Array[InputEvent]([SubResource("InputEventKey_jirkf"), SubResource("InputEventJoypadMotion_kt5p7")]) metadata/_custom_type_script = "uid://bbs1u7ojno7xo" [node name="Label" type="Label" parent="Menu/Control"] layout_mode = 0 offset_left = 72.0 offset_top = -89.0 offset_right = 374.0 offset_bottom = -40.0 theme_type_variation = &"HeaderMedium" text = "Move trough the room" [connection signal="pressed" from="Menu/PressStart" to="." method="_on_start_button_pressed"] [connection signal="toggled" from="Menu/VBoxContainer/CNBox" to="." method="_on_cn_box_toggled"] [connection signal="toggled" from="Menu/VBoxContainer/MotionBox" to="." method="_on_motion_box_toggled"] [connection signal="item_selected" from="Menu/VBoxContainer/OptionButton" to="." method="_on_option_button_item_selected"]