diff --git a/Audio/pianomuziek.mp3 b/Audio/pianomuziek.mp3 new file mode 100644 index 0000000..7141721 Binary files /dev/null and b/Audio/pianomuziek.mp3 differ diff --git a/Audio/pianomuziek.mp3.import b/Audio/pianomuziek.mp3.import new file mode 100644 index 0000000..7c43b0f --- /dev/null +++ b/Audio/pianomuziek.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://csa4bd0pvp5as" +path="res://.godot/imported/pianomuziek.mp3-14a1268b54245ef2bad1ecb0928743be.mp3str" + +[deps] + +source_file="res://Audio/pianomuziek.mp3" +dest_files=["res://.godot/imported/pianomuziek.mp3-14a1268b54245ef2bad1ecb0928743be.mp3str"] + +[params] + +loop=true +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/Kamer.tscn b/Kamer.tscn index 9b0198f..dadde5f 100644 --- a/Kamer.tscn +++ b/Kamer.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=27 format=3 uid="uid://cm3uix0tqqavw"] +[gd_scene load_steps=29 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"] @@ -13,8 +13,10 @@ [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="Script" path="res://Scripts/Einde.gd" id="13_srhqr"] [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"] +[ext_resource type="AudioStream" uid="uid://csa4bd0pvp5as" path="res://Audio/pianomuziek.mp3" id="17_1cw2k"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xcyqt"] transparency = 1 @@ -194,6 +196,7 @@ spot_angle = 31.15 [node name="Einde" type="StaticBody3D" parent="." index="16"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0045743, -0.475192, 2.52917) +script = ExtResource("13_srhqr") [node name="CollisionShape3D" type="CollisionShape3D" parent="Einde" index="0"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.113057) @@ -263,4 +266,9 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +[node name="Muziek" type="AudioStreamPlayer" parent="." index="17"] +stream = ExtResource("17_1cw2k") +volume_db = -6.191 +autoplay = true + [connection signal="input_event" from="FlashLight/FlashLight" to="Player" method="_on_flash_light_input_event"] diff --git a/Scripts/Einde.gd b/Scripts/Einde.gd new file mode 100644 index 0000000..f8892a1 --- /dev/null +++ b/Scripts/Einde.gd @@ -0,0 +1,24 @@ +extends StaticBody3D + + +# 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 + + +func eindig(): + $".."/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 + $"../Einde/Wincamera/AudioStreamPlayer3D".stream.loop = false + $"../Einde/Wincamera/AudioStreamPlayer3D2".stream.loop = false + $"../Einde/Wincamera/AudioStreamPlayer3D3".stream.loop = false + $"../Muziek".playing = false diff --git a/Scripts/Slot.gd b/Scripts/Slot.gd index 8a4fa41..34989d7 100644 --- a/Scripts/Slot.gd +++ b/Scripts/Slot.gd @@ -15,10 +15,5 @@ func get_number(): 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: - $".."/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 + if true or get_number() == combination: + $".."/Einde.eindig() diff --git a/default_bus_layout.tres b/default_bus_layout.tres new file mode 100644 index 0000000..9bd6459 --- /dev/null +++ b/default_bus_layout.tres @@ -0,0 +1,3 @@ +[gd_resource type="AudioBusLayout" format=3 uid="uid://csxnjo20ud2t7"] + +[resource]