diff --git a/Audio/A.mp3 b/Audio/A.mp3 new file mode 100644 index 0000000..e8c2f35 Binary files /dev/null and b/Audio/A.mp3 differ diff --git a/Audio/A.mp3.import b/Audio/A.mp3.import new file mode 100644 index 0000000..40e6847 --- /dev/null +++ b/Audio/A.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://dbytsd3kjoxxt" +path="res://.godot/imported/A.mp3-b9362bd7f2e4a60c8f68935a103cba7e.mp3str" + +[deps] + +source_file="res://Audio/A.mp3" +dest_files=["res://.godot/imported/A.mp3-b9362bd7f2e4a60c8f68935a103cba7e.mp3str"] + +[params] + +loop=true +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Audio/D.mp3 b/Audio/D.mp3 new file mode 100644 index 0000000..cb6aa18 Binary files /dev/null and b/Audio/D.mp3 differ diff --git a/Audio/D.mp3.import b/Audio/D.mp3.import new file mode 100644 index 0000000..740e500 --- /dev/null +++ b/Audio/D.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://wphketv7cs0b" +path="res://.godot/imported/D.mp3-ca80fc630adeef222f837dd41c6ce617.mp3str" + +[deps] + +source_file="res://Audio/D.mp3" +dest_files=["res://.godot/imported/D.mp3-ca80fc630adeef222f837dd41c6ce617.mp3str"] + +[params] + +loop=true +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Audio/F#.mp3 b/Audio/F#.mp3 new file mode 100644 index 0000000..7a3c66c Binary files /dev/null and b/Audio/F#.mp3 differ diff --git a/Audio/F#.mp3.import b/Audio/F#.mp3.import new file mode 100644 index 0000000..2676c36 --- /dev/null +++ b/Audio/F#.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://cdyategn54nml" +path="res://.godot/imported/F#.mp3-298f76624f06a3680e2845240270aa18.mp3str" + +[deps] + +source_file="res://Audio/F#.mp3" +dest_files=["res://.godot/imported/F#.mp3-298f76624f06a3680e2845240270aa18.mp3str"] + +[params] + +loop=true +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Audio/congratulations.ogg b/Audio/congratulations.ogg deleted file mode 100644 index 8527bf0..0000000 Binary files a/Audio/congratulations.ogg and /dev/null differ diff --git a/Audio/congratulations.ogg.import b/Audio/congratulations.ogg.import deleted file mode 100644 index 93278d9..0000000 --- a/Audio/congratulations.ogg.import +++ /dev/null @@ -1,19 +0,0 @@ -[remap] - -importer="oggvorbisstr" -type="AudioStreamOggVorbis" -uid="uid://ib7k6myjnajr" -path="res://.godot/imported/congratulations.ogg-7c6b9c91a435bbc9911d803ac0cf6c69.oggvorbisstr" - -[deps] - -source_file="res://Audio/congratulations.ogg" -dest_files=["res://.godot/imported/congratulations.ogg-7c6b9c91a435bbc9911d803ac0cf6c69.oggvorbisstr"] - -[params] - -loop=true -loop_offset=0 -bpm=0 -beat_count=0 -bar_beats=4 diff --git a/Kamer.tscn b/Kamer.tscn index c10e0a1..436e21a 100644 --- a/Kamer.tscn +++ b/Kamer.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=21 format=3 uid="uid://cm3uix0tqqavw"] +[gd_scene load_steps=27 format=3 uid="uid://cm3uix0tqqavw"] [ext_resource type="PackedScene" uid="uid://d4hqxyxouje7e" path="res://Objects/Meshes/kamer.glb" id="1_50aco"] [ext_resource type="Texture2D" uid="uid://bjok373y2ssb3" path="res://Images/sky.hdr" id="2_2aenl"] +[ext_resource type="Script" path="res://Scripts/Kamer.gd" id="2_m2v8w"] [ext_resource type="PackedScene" uid="uid://4o2ljtcup5bo" path="res://Player.tscn" id="3_l7pp6"] [ext_resource type="PackedScene" uid="uid://bmuy4jimpch1i" path="res://Objects/ladekast.tscn" id="4_23v8p"] [ext_resource type="PackedScene" uid="uid://cpjo05ataob66" path="res://Objects/Painting.tscn" id="5_jk1xx"] @@ -11,11 +12,17 @@ [ext_resource type="PackedScene" uid="uid://bm3d233ul4asx" path="res://Objects/Slot.tscn" id="9_pjl12"] [ext_resource type="PackedScene" uid="uid://5iw01h08cchr" path="res://Objects/redherring.tscn" id="10_4kyam"] [ext_resource type="PackedScene" uid="uid://bxahadoddp0ml" path="res://Objects/desklamp.tscn" id="11_dlgxa"] +[ext_resource type="AudioStream" uid="uid://dbytsd3kjoxxt" path="res://Audio/A.mp3" id="13_rboc8"] +[ext_resource type="AudioStream" uid="uid://cdyategn54nml" path="res://Audio/F#.mp3" id="14_uv1td"] +[ext_resource type="AudioStream" uid="uid://wphketv7cs0b" path="res://Audio/D.mp3" id="15_k8hy3"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xcyqt"] transparency = 1 albedo_color = Color(0.14902, 0.152941, 0.164706, 0.47451) +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_qhbeh"] +points = PackedVector3Array(-1.05, -0.5247, -0.4794, -2.4247e-05, 0.5253, 0.5706, -2.4247e-05, 0.5253, -0.4794, -2.4247e-05, -0.5247, 0.5706, -1.05, 0.5253, 0.5706, -2.4247e-05, -0.5247, -0.4794, -1.05, 0.5253, -0.4794, -1.05, -0.5247, 0.5706) + [sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_ybihp"] data = PackedVector3Array(-2.0289, -1.2789, 2.0289, -2.0289, 1.2789, 2.0289, -2.0289, 1.2789, -2.0289, -2.0289, -1.2789, 2.0289, -2.0289, 1.2789, -2.0289, -2.0289, -1.2789, -2.0289, 2.0289, -1.2789, -2.0289, 2.0289, 1.2789, -2.0289, 2.0289, 1.2789, 2.0289, 2.0289, -1.2789, -2.0289, 2.0289, 1.2789, 2.0289, 2.0289, -1.2789, 2.0289, -2.0289, -1.2789, -2.0289, -2.0289, 1.2789, -2.0289, 2.0289, 1.2789, -2.0289, -2.0289, -1.2789, -2.0289, 2.0289, 1.2789, -2.0289, 2.0289, -1.2789, -2.0289, -0.5269, -1.2789, 2.0289, -0.5269, 0.9153, 2.0289, -2.0289, 1.2789, 2.0289, -0.5269, -1.2789, 2.0289, -2.0289, 1.2789, 2.0289, -2.0289, -1.2789, 2.0289, 0.5269, 0.9153, 2.0289, 0.5269, -1.2789, 2.0289, 2.0289, -1.2789, 2.0289, 0.5269, 0.9153, 2.0289, 2.0289, -1.2789, 2.0289, 2.0289, 1.2789, 2.0289, -0.5269, 0.9153, 2.0289, 0.5269, 0.9153, 2.0289, 2.0289, 1.2789, 2.0289, -0.5269, 0.9153, 2.0289, 2.0289, 1.2789, 2.0289, -2.0289, 1.2789, 2.0289, 0.5269, -1.2789, 2.0289, -0.5269, -1.2789, 2.0289, 2.0289, -1.2789, 2.0289, -0.5269, -1.2789, 2.0289, -2.0289, -1.2789, 2.0289, 2.0289, -1.2789, 2.0289, 0.8296, 1.2789, 0.8296, -0.8296, 1.2789, 0.8296, -2.0289, 1.2789, 2.0289, 0.8296, 1.2789, 0.8296, -2.0289, 1.2789, 2.0289, 2.0289, 1.2789, 2.0289, 0.8296, 1.2789, -0.8296, 0.8296, 1.2789, 0.8296, 2.0289, 1.2789, 2.0289, 0.8296, 1.2789, -0.8296, 2.0289, 1.2789, 2.0289, 2.0289, 1.2789, -2.0289, -0.8296, 1.2789, 0.8296, -0.8296, 1.2789, -0.8296, -2.0289, 1.2789, -2.0289, -0.8296, 1.2789, 0.8296, -2.0289, 1.2789, -2.0289, -2.0289, 1.2789, 2.0289, -0.8296, 1.2789, -0.8296, 0.8296, 1.2789, -0.8296, 2.0289, 1.2789, -2.0289, -0.8296, 1.2789, -0.8296, 2.0289, 1.2789, -2.0289, -2.0289, 1.2789, -2.0289, -2.0731, -1.3202, 2.0702, -2.0711, -1.3211, -2.0711, -2.066, 1.3276, -2.071, -2.0731, -1.3202, 2.0702, -2.066, 1.3276, -2.071, -2.071, 1.3276, 2.066, -2.0711, -1.3211, -2.0711, -2.0731, -1.3202, 2.0702, 2.0731, -1.3202, 2.0702, -2.0711, -1.3211, -2.0711, 2.0731, -1.3202, 2.0702, 2.0711, -1.3212, -2.0711, 2.0711, -1.3212, -2.0711, 2.0731, -1.3202, 2.0702, 2.071, 1.3276, 2.066, 2.0711, -1.3212, -2.0711, 2.071, 1.3276, 2.066, 2.066, 1.3276, -2.071, -2.0711, -1.3211, -2.0711, 2.0711, -1.3212, -2.0711, 2.066, 1.3276, -2.071, -2.0711, -1.3211, -2.0711, 2.066, 1.3276, -2.071, -2.066, 1.3276, -2.071, -0.5269, -1.2789, 2.0711, -2.0731, -1.3202, 2.0702, -2.071, 1.3276, 2.066, -0.5269, -1.2789, 2.0711, -2.071, 1.3276, 2.066, -0.5269, 0.9153, 2.0711, 0.5269, 0.9153, 2.0711, 2.071, 1.3276, 2.066, 2.0731, -1.3202, 2.0702, 0.5269, 0.9153, 2.0711, 2.0731, -1.3202, 2.0702, 0.5269, -1.2789, 2.0711, -0.5269, 0.9153, 2.0711, -2.071, 1.3276, 2.066, 2.071, 1.3276, 2.066, -0.5269, 0.9153, 2.0711, 2.071, 1.3276, 2.066, 0.5269, 0.9153, 2.0711, 0.5269, -1.2789, 2.0711, 2.0731, -1.3202, 2.0702, -2.0731, -1.3202, 2.0702, 0.5269, -1.2789, 2.0711, -2.0731, -1.3202, 2.0702, -0.5269, -1.2789, 2.0711, 0.8294, 1.6416, 0.8294, 2.071, 1.3276, 2.066, -2.071, 1.3276, 2.066, 0.8294, 1.6416, 0.8294, -2.071, 1.3276, 2.066, -0.8294, 1.6416, 0.8294, 0.8294, 1.6416, -0.8294, 2.066, 1.3276, -2.071, 2.071, 1.3276, 2.066, 0.8294, 1.6416, -0.8294, 2.071, 1.3276, 2.066, 0.8294, 1.6416, 0.8294, -0.8294, 1.6416, 0.8294, -2.071, 1.3276, 2.066, -2.066, 1.3276, -2.071, -0.8294, 1.6416, 0.8294, -2.066, 1.3276, -2.071, -0.8294, 1.6416, -0.8294, -0.8294, 1.6416, -0.8294, -2.066, 1.3276, -2.071, 2.066, 1.3276, -2.071, -0.8294, 1.6416, -0.8294, 2.066, 1.3276, -2.071, 0.8294, 1.6416, -0.8294, -0.8296, 1.2789, 0.8296, 0.8296, 1.2789, 0.8296, 0.8294, 1.6416, 0.8294, -0.8296, 1.2789, 0.8296, 0.8294, 1.6416, 0.8294, -0.8294, 1.6416, 0.8294, 0.5269, 0.9153, 2.0289, -0.5269, 0.9153, 2.0289, -0.5269, 0.9153, 2.0711, 0.5269, 0.9153, 2.0289, -0.5269, 0.9153, 2.0711, 0.5269, 0.9153, 2.0711, 0.8296, 1.2789, -0.8296, -0.8296, 1.2789, -0.8296, -0.8294, 1.6416, -0.8294, 0.8296, 1.2789, -0.8296, -0.8294, 1.6416, -0.8294, 0.8294, 1.6416, -0.8294, -0.5269, 0.9153, 2.0289, -0.5269, -1.2789, 2.0289, -0.5269, -1.2789, 2.0711, -0.5269, 0.9153, 2.0289, -0.5269, -1.2789, 2.0711, -0.5269, 0.9153, 2.0711, 0.8296, 1.2789, 0.8296, 0.8296, 1.2789, -0.8296, 0.8294, 1.6416, -0.8294, 0.8296, 1.2789, 0.8296, 0.8294, 1.6416, -0.8294, 0.8294, 1.6416, 0.8294, -0.5269, -1.2789, 2.0289, 0.5269, -1.2789, 2.0289, 0.5269, -1.2789, 2.0711, -0.5269, -1.2789, 2.0289, 0.5269, -1.2789, 2.0711, -0.5269, -1.2789, 2.0711, 0.5269, -1.2789, 2.0289, 0.5269, 0.9153, 2.0289, 0.5269, 0.9153, 2.0711, 0.5269, -1.2789, 2.0289, 0.5269, 0.9153, 2.0711, 0.5269, -1.2789, 2.0711, -0.8296, 1.2789, -0.8296, -0.8296, 1.2789, 0.8296, -0.8294, 1.6416, 0.8294, -0.8296, 1.2789, -0.8296, -0.8294, 1.6416, 0.8294, -0.8294, 1.6416, -0.8294, -2.0289, -1.2789, -2.0289, 2.0289, -1.2789, -2.0289, 2.0289, -1.2789, 2.0289, -2.0289, -1.2789, -2.0289, 2.0289, -1.2789, 2.0289, -2.0289, -1.2789, 2.0289) @@ -53,7 +60,10 @@ material = SubResource("ShaderMaterial_y08nn") text = "1984" depth = 0.01 +[sub_resource type="BoxShape3D" id="BoxShape3D_1n82u"] + [node name="kamer" instance=ExtResource("1_50aco")] +script = ExtResource("2_m2v8w") [node name="IndirectLight" type="OmniLight3D" parent="." index="0"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.68221, -0.692571, -1.67621) @@ -67,9 +77,30 @@ shadow_blur = 0.445 omni_range = 10.0 omni_attenuation = 0.435276 +[node name="IndirectLightDoor" type="OmniLight3D" parent="." index="1"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.672863, -1.14902, 1.25191) +visible = false +light_color = Color(1, 0.952941, 0.898039, 1) +light_energy = 1.389 +light_size = 1.0 +light_specular = 0.0 +shadow_opacity = 0.22 +shadow_blur = 0.445 +omni_range = 10.0 +omni_attenuation = 0.435276 + [node name="Dakraam" parent="Room" index="0"] surface_material_override/0 = SubResource("StandardMaterial3D_xcyqt") +[node name="Doorframe" parent="Room" index="1"] +cast_shadow = 0 + +[node name="Deur" type="StaticBody3D" parent="Room/Doorframe/Door" index="0"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Room/Doorframe/Door/Deur" index="0"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) +shape = SubResource("ConvexPolygonShape3D_qhbeh") + [node name="OmniLight3D2" type="OmniLight3D" parent="Room" index="2"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.533369, 1.5549, -0.629147) light_color = Color(1, 0.960784, 0.933333, 1) @@ -85,10 +116,10 @@ omni_attenuation = 0.108819 [node name="CollisionShape3D" type="CollisionShape3D" parent="Room/StaticBody3D" index="0"] shape = SubResource("ConcavePolygonShape3D_ybihp") -[node name="WorldEnvironment" type="WorldEnvironment" parent="." index="2"] +[node name="WorldEnvironment" type="WorldEnvironment" parent="." index="3"] environment = SubResource("Environment_63mw4") -[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." index="3"] +[node name="Zon" type="DirectionalLight3D" parent="." index="4"] transform = Transform3D(0.744253, 0.38803, -0.543618, 0.0836868, 0.753332, 0.652294, 0.662634, -0.530966, 0.528196, 0, 4.22767, 0) light_color = Color(0.945098, 0.992157, 1, 1) light_energy = 2.333 @@ -98,16 +129,18 @@ directional_shadow_mode = 0 directional_shadow_fade_start = 0.814 directional_shadow_max_distance = 8.2 -[node name="Player" parent="." index="4" instance=ExtResource("3_l7pp6")] +[node name="Player" parent="." index="5" node_paths=PackedStringArray("win", "win_position") instance=ExtResource("3_l7pp6")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.175659, -1.13536, 0.499683) +win = NodePath("../Einde") +win_position = NodePath("../Einde/Wincamera") -[node name="ladekast" parent="." index="5" instance=ExtResource("4_23v8p")] +[node name="ladekast" parent="." index="6" instance=ExtResource("4_23v8p")] transform = Transform3D(-0.4, 0, -3.49691e-08, 0, 0.4, 0, 3.49691e-08, 0, -0.4, 1.25, -1.279, 1.596) -[node name="Painting" parent="." index="6" instance=ExtResource("5_jk1xx")] +[node name="Painting" parent="." index="7" instance=ExtResource("5_jk1xx")] transform = Transform3D(1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 1.969, 0.214, 0.67903) -[node name="FlashLight" type="MeshInstance3D" parent="." index="7"] +[node name="FlashLight" type="MeshInstance3D" parent="." index="8"] transform = Transform3D(0.0965925, -0.0258819, -1.13134e-09, 0, -4.37114e-09, 0.1, -0.0258819, -0.0965925, -4.2222e-09, -1.21576, -0.391011, -1.00824) mesh = SubResource("CapsuleMesh_ivvkw") skeleton = NodePath("../safe") @@ -120,23 +153,23 @@ collision_layer = 2 transform = Transform3D(1, 0, 8.88178e-16, 0, 1, -7.10543e-15, 0, 0, 1, 0, 0, 0) shape = SubResource("CapsuleShape3D_n067y") -[node name="safe" parent="." index="8" instance=ExtResource("6_3qx7f")] +[node name="safe" parent="." index="9" instance=ExtResource("6_3qx7f")] transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, -1.50079, -0.0682462, -1.05664) -[node name="lichtkastje" parent="." index="9" instance=ExtResource("7_ahvul")] -transform = Transform3D(-8.74228e-09, 0, 0.2, 0, 0.2, 0, -0.2, 0, -8.74228e-09, -1.01622, 0.0241756, 1.95736) +[node name="lichtkastje" parent="." index="10" instance=ExtResource("7_ahvul")] +transform = Transform3D(-8.74228e-09, 0, 0.2, 0, 0.2, 0, -0.2, 0, -8.74228e-09, -1.01622, 0.0241756, 1.94583) -[node name="CombiCode" type="MeshInstance3D" parent="." index="10"] +[node name="CombiCode" type="MeshInstance3D" parent="." index="11"] transform = Transform3D(0.709362, 0.443678, -0.547682, -5.96046e-08, 0.777026, 0.62947, 0.704845, -0.446522, 0.551192, 1.84123, -0.566121, -1.81842) mesh = SubResource("TextMesh_k0gcf") -[node name="Slot" parent="." index="11" instance=ExtResource("9_pjl12")] +[node name="Slot" parent="." index="12" instance=ExtResource("9_pjl12")] transform = Transform3D(-4.37114e-09, 0, 0.1, 0, 0.1, 0, -0.1, 0, -4.37114e-09, -1.95266, 0.0372345, 0.0309203) -[node name="redherring" parent="." index="12" instance=ExtResource("10_4kyam")] +[node name="redherring" parent="." index="13" instance=ExtResource("10_4kyam")] transform = Transform3D(0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 1.9478, 0.1703, -1.05829) -[node name="desk_lamp_arm_01_1k" parent="." index="13" instance=ExtResource("11_dlgxa")] +[node name="desk_lamp_arm_01_1k" parent="." index="14" instance=ExtResource("11_dlgxa")] transform = Transform3D(0.745232, 0, 0.666806, 0, 1, 0, -0.666806, 0, 0.745232, 1.63545, -0.479, 1.47139) [node name="SpotLight3D" type="SpotLight3D" parent="desk_lamp_arm_01_1k" index="1"] @@ -148,4 +181,75 @@ spot_range = 1.883 spot_attenuation = 0.0796601 spot_angle = 31.15 +[node name="Einde" type="StaticBody3D" parent="." index="15"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0045743, -0.475192, 2.52917) + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Einde" index="0"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.113057) +shape = SubResource("BoxShape3D_1n82u") + +[node name="Wincamera" type="Camera3D" parent="Einde" index="1"] +transform = Transform3D(-0.717378, 0.325996, 0.615708, 0.022655, 0.894217, -0.447061, -0.696316, -0.306763, -0.648877, -0.0045743, -0.224675, 3.27438) + +[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="Einde/Wincamera" index="0"] +transform = Transform3D(1, -2.98023e-08, 2.98023e-08, 2.98023e-08, 1, 1.49012e-08, 2.98023e-08, 1.49012e-08, 1, 1.77532, 2.38419e-07, -4.76837e-07) +stream = ExtResource("13_rboc8") +volume_db = -3.0 +unit_size = 0.5 +panning_strength = 2.0 + +[node name="AudioStreamPlayer3D2" type="AudioStreamPlayer3D" parent="Einde/Wincamera" index="1"] +transform = Transform3D(1, -2.98023e-08, 2.98023e-08, 2.98023e-08, 1, 1.49012e-08, 2.98023e-08, 1.49012e-08, 1, -1.8788, 2.38419e-07, -7.15256e-07) +stream = ExtResource("14_uv1td") +volume_db = -3.0 +unit_size = 0.5 +panning_strength = 2.0 + +[node name="AudioStreamPlayer3D3" type="AudioStreamPlayer3D" parent="Einde/Wincamera" index="2"] +transform = Transform3D(1, -2.98023e-08, 2.98023e-08, 2.98023e-08, 1, 1.49012e-08, 2.98023e-08, 1.49012e-08, 1, 0.0172234, 2.38419e-07, -2.11078) +stream = ExtResource("15_k8hy3") +volume_db = -3.0 +unit_size = 0.5 +panning_strength = 2.0 + +[node name="Thx" type="Control" parent="Einde" index="2"] +visible = false +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="CenterContainer" type="CenterContainer" parent="Einde/Thx" index="0"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="RichTextLabel" type="RichTextLabel" parent="Einde/Thx/CenterContainer" index="0"] +clip_contents = false +custom_minimum_size = Vector2(300, 0) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 4 +theme_override_colors/default_color = Color(0, 0, 0, 1) +theme_override_colors/font_selected_color = Color(0, 0, 0, 1) +theme_override_colors/font_shadow_color = Color(0, 0, 0, 1) +theme_override_font_sizes/normal_font_size = 72 +text = "Thanks for playing" +fit_content_height = true + +[node name="MarginContainer" type="MarginContainer" parent="Einde/Thx" index="1"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + [connection signal="input_event" from="FlashLight/FlashLight" to="Player" method="_on_flash_light_input_event"] diff --git a/Objects/Slot.tscn b/Objects/Slot.tscn index 4e2565f..93f6920 100644 --- a/Objects/Slot.tscn +++ b/Objects/Slot.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=9 format=3 uid="uid://bm3d233ul4asx"] +[gd_scene load_steps=8 format=3 uid="uid://bm3d233ul4asx"] [ext_resource type="PackedScene" uid="uid://bgbv67hxphufl" path="res://Objects/combi.tscn" id="1_7rjc3"] [ext_resource type="Script" path="res://Scripts/Slot.gd" id="1_ksddl"] [ext_resource type="AudioStream" uid="uid://dr8lncxad2pwm" path="res://Audio/click.wav" id="3_pbq0q"] -[ext_resource type="AudioStream" uid="uid://ib7k6myjnajr" path="res://Audio/congratulations.ogg" id="4_aojg2"] [sub_resource type="BoxMesh" id="BoxMesh_5jhoy"] size = Vector3(6, 2, 1) @@ -50,7 +49,4 @@ shape = SubResource("BoxShape3D_v83up") [node name="Audio" type="AudioStreamPlayer" parent="Body/Knop"] stream = ExtResource("3_pbq0q") -[node name="Congratulations" type="AudioStreamPlayer" parent="."] -stream = ExtResource("4_aojg2") - [connection signal="input_event" from="Body/Knop/StaticBody3D" to="." method="_on_static_body_3d_input_event"] diff --git a/Objects/lichtkastje.tscn b/Objects/lichtkastje.tscn index 1a58989..04de634 100644 --- a/Objects/lichtkastje.tscn +++ b/Objects/lichtkastje.tscn @@ -11,8 +11,8 @@ albedo_color = Color(0, 0, 0, 1) emission_enabled = true emission = Color(0, 0, 0.419608, 1) -[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_chvxh"] -points = PackedVector3Array(0.980636, 2.74175, 0.2541, -1, -0.0139211, -1, -1, -0.0139211, 0.996143, 1, -0.0192875, 1, 0.996143, -0.0139211, -1, -0.968964, 2.72014, -0.2541, -0.998978, 1.7215, 0.995121, 0.995121, 1.7215, -0.998978, -0.998978, 1.7215, -0.998978, 0.995121, 1.7215, 0.995121, -0.984493, 2.74175, 0.2541, 0.965107, 2.72014, -0.2541) +[sub_resource type="BoxShape3D" id="BoxShape3D_uh5nr"] +size = Vector3(1, 3, 2) [node name="lichtkastje" instance=ExtResource("1_je302")] script = ExtResource("2_m7o1t") @@ -30,8 +30,8 @@ surface_material_override/0 = SubResource("StandardMaterial3D_smcqf") collision_layer = 2 [node name="CollisionShape3D" type="CollisionShape3D" parent="Lever/Lever" index="0"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) -shape = SubResource("ConvexPolygonShape3D_chvxh") +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.33084, 0) +shape = SubResource("BoxShape3D_uh5nr") [connection signal="input_event" from="Lock/Lock" to="." method="_on_lock_input_event"] [connection signal="input_event" from="Lever/Lever" to="." method="_on_lever_input_event"] diff --git a/Scripts/Kamer.gd b/Scripts/Kamer.gd new file mode 100644 index 0000000..9b28b00 --- /dev/null +++ b/Scripts/Kamer.gd @@ -0,0 +1,9 @@ +extends Node3D + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass diff --git a/Scripts/Player.gd b/Scripts/Player.gd index 40cb0a3..5a9be3b 100644 --- a/Scripts/Player.gd +++ b/Scripts/Player.gd @@ -1,34 +1,56 @@ extends CharacterBody3D -const WALK_SPEED = 3.0 +const WALK_SPEED = 2.0 const MOUSE_SENS = 0.002 var has_flashlight = false var has_key = false @onready var flashlight = $"../FlashLight" +@export var win: Node +var won = false +@export var win_position: Node var mouse_mode = 2 func _ready(): Input.set_mouse_mode(mouse_mode) + add_collision_exception_with($"../Room/Doorframe/Door") func _input(event): - if event is InputEventMouseMotion and mouse_mode == 2: - $Pivot.rotate_y(-event.relative.x*MOUSE_SENS) - $Pivot/Camera.rotate_x(-event.relative.y*MOUSE_SENS) - elif event.is_action_pressed("mode"): - mouse_mode = mouse_mode ^ 1 - Input.set_mouse_mode(mouse_mode) - elif event.is_action_pressed("alt") and has_flashlight: - $Pivot/Camera/FlashLight/SpotLight3D.visible = !$Pivot/Camera/FlashLight/SpotLight3D.visible + if !won: + if event is InputEventMouseMotion and mouse_mode == 2: + $Pivot.rotate_y(-event.relative.x*MOUSE_SENS) + $Pivot/Camera.rotate_x(-event.relative.y*MOUSE_SENS) + elif event.is_action_pressed("mode"): + mouse_mode = mouse_mode ^ 1 + Input.set_mouse_mode(mouse_mode) + elif event.is_action_pressed("alt") and has_flashlight: + $Pivot/Camera/FlashLight/SpotLight3D.visible = !$Pivot/Camera/FlashLight/SpotLight3D.visible func _physics_process(delta): - if mouse_mode == 2: + if mouse_mode == 2 and !won: var input_dir = Input.get_vector("move_left", "move_right", "move_forward", "move_back") var direction = ($Pivot.transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized() velocity.x = direction.x * WALK_SPEED velocity.z = direction.z * WALK_SPEED - move_and_slide() + var bump = move_and_collide(velocity*delta) + if bump and bump.get_collider() == win: + won = true + $Pivot/Camera/FlashLight.visible = false + $Pivot/Camera.basis = Basis() + elif won: + var a = Quaternion($Pivot.transform.basis) + var b = Quaternion(win_position.transform.basis) + var c = a.slerp(b,delta*0.1) + $Pivot.transform.basis = Basis(c) + var d = win_position.position + position = position.slerp(win_position.position, delta * 0.5) + if (a - b).length() < 0.1 : + $"../WorldEnvironment".environment.background_energy_multiplier += delta + if $"../WorldEnvironment".environment.background_energy_multiplier > 2.0: + $"../Einde/Thx".visible = true + if $"../WorldEnvironment".environment.background_energy_multiplier > 10.0: + get_tree().quit() func _on_flash_light_input_event(camera, event, position, normal, shape_idx): if event is InputEventMouseButton and event.is_action_pressed("interact"): diff --git a/Scripts/Slot.gd b/Scripts/Slot.gd index 5ef250a..8a4fa41 100644 --- a/Scripts/Slot.gd +++ b/Scripts/Slot.gd @@ -16,4 +16,9 @@ func _on_static_body_3d_input_event(camera, event, position, normal, shape_idx): if event is InputEventMouseButton and event.is_action_pressed("interact"): $Body/Knop/Audio.playing = true if get_number() == combination: - $Congratulations.playing = true + $".."/Room/Doorframe/Door.visible = false + $".."/Room/Doorframe/Door/Deur.set_collision_layer(0) + $"../IndirectLightDoor".visible = true + $"../Einde/Wincamera/AudioStreamPlayer3D".playing = true + $"../Einde/Wincamera/AudioStreamPlayer3D2".playing = true + $"../Einde/Wincamera/AudioStreamPlayer3D3".playing = true