pianomuziekje en eindscript

This commit is contained in:
2023-02-05 13:24:46 +01:00
parent 77f188ba54
commit a0b7737b94
6 changed files with 57 additions and 8 deletions
Binary file not shown.
+19
View File
@@ -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
+9 -1
View File
@@ -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"]
+24
View File
@@ -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
+2 -7
View File
@@ -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()
+3
View File
@@ -0,0 +1,3 @@
[gd_resource type="AudioBusLayout" format=3 uid="uid://csxnjo20ud2t7"]
[resource]