ander lichtkastje. sleutel in de la

This commit is contained in:
2023-02-02 22:32:36 +01:00
parent 504e9501fa
commit 46897a2742
11 changed files with 211 additions and 37 deletions
Binary file not shown.
+30
View File
@@ -0,0 +1,30 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dnho3rpbb72mw"
path="res://.godot/imported/lichtkastje.glb-5aa8f6dc6924e9b2c43274db1707635b.scn"
[deps]
source_file="res://Objects/Meshes/lichtkastje.glb"
dest_files=["res://.godot/imported/lichtkastje.glb-5aa8f6dc6924e9b2c43274db1707635b.scn"]
[params]
nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
import_script/path=""
_subresources={}
Binary file not shown.
+30
View File
@@ -0,0 +1,30 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://sf6qwnnx2uth"
path="res://.godot/imported/sleutel.glb-5f67593bf97ed4577477471d14167a4f.scn"
[deps]
source_file="res://Objects/Meshes/sleutel.glb"
dest_files=["res://.godot/imported/sleutel.glb-5f67593bf97ed4577477471d14167a4f.scn"]
[params]
nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
import_script/path=""
_subresources={}
+61 -4
View File
File diff suppressed because one or more lines are too long
+37
View File
@@ -0,0 +1,37 @@
[gd_scene load_steps=6 format=3 uid="uid://b5rve73suh7fc"]
[ext_resource type="PackedScene" uid="uid://dnho3rpbb72mw" path="res://Objects/Meshes/lichtkastje.glb" id="1_je302"]
[ext_resource type="Script" path="res://Scripts/lichtkastje.gd" id="2_m7o1t"]
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_jddrt"]
points = PackedVector3Array(-1.01587, -1.01587, -1.01587, 0.999969, 1, 1, 0.999969, 1, -1, -1.01587, 1.01587, 1.01587, 0.999969, -1, 1, -1.01587, 1.01587, -1.01587, -1.01587, -1.01587, 1.01587, 0.999969, -1, -1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_smcqf"]
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)
[node name="lichtkastje" instance=ExtResource("1_je302")]
script = ExtResource("2_m7o1t")
[node name="Lock" type="StaticBody3D" parent="Lock" index="0"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Lock/Lock" index="0"]
shape = SubResource("ConvexPolygonShape3D_jddrt")
[node name="Lever" parent="." index="4"]
transform = Transform3D(0.0287741, 0, 0, 0, 0.208095, 0, 0, 0, 0.208095, -0.182957, 0, 0)
surface_material_override/0 = SubResource("StandardMaterial3D_smcqf")
[node name="Lever" type="StaticBody3D" parent="Lever" index="0"]
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")
[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"]
+15
View File
@@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=3 uid="uid://8pfiamxn57gg"]
[ext_resource type="PackedScene" uid="uid://sf6qwnnx2uth" path="res://Objects/Meshes/sleutel.glb" id="1_ykqoq"]
[sub_resource type="SphereShape3D" id="SphereShape3D_4brfa"]
radius = 0.1
[node name="sleutel" instance=ExtResource("1_ykqoq")]
[node name="StaticBody3D" type="StaticBody3D" parent="Sleutel" index="0"]
collision_layer = 2
collision_priority = 2.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Sleutel/StaticBody3D" index="0"]
shape = SubResource("SphereShape3D_4brfa")
+7 -33
View File
@@ -1,8 +1,6 @@
[gd_scene load_steps=22 format=3 uid="uid://dlj15vm6dahio"]
[gd_scene load_steps=18 format=3 uid="uid://dlj15vm6dahio"]
[ext_resource type="PackedScene" uid="uid://4o2ljtcup5bo" path="res://Player.tscn" id="1_pmt73"]
[ext_resource type="Script" path="res://Scripts/lichtknop.gd" id="2_gwtwo"]
[ext_resource type="AudioStream" uid="uid://dr8lncxad2pwm" path="res://Audio/click.wav" id="3_e26r5"]
[ext_resource type="PackedScene" uid="uid://bm3d233ul4asx" path="res://Objects/Slot.tscn" id="4_kvwvq"]
[ext_resource type="PackedScene" uid="uid://cpjo05ataob66" path="res://Objects/Painting.tscn" id="5_glq61"]
[ext_resource type="Shader" path="res://Shaders/Blacklight.gdshader" id="7_agddp"]
@@ -10,6 +8,7 @@
[ext_resource type="PackedScene" uid="uid://cd3wfbyld8a5k" path="res://Objects/Dixiebak.tscn" id="8_fr0uk"]
[ext_resource type="PackedScene" uid="uid://bmuy4jimpch1i" path="res://Objects/ladekast.tscn" id="8_oqsh4"]
[ext_resource type="PackedScene" uid="uid://5iw01h08cchr" path="res://Objects/redherring.tscn" id="10_qul4r"]
[ext_resource type="PackedScene" uid="uid://b5rve73suh7fc" path="res://Objects/lichtkastje.tscn" id="11_ayjqu"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_rahav"]
@@ -39,17 +38,6 @@ volumetric_fog_detail_spread = 5.2233
volumetric_fog_sky_affect = 0.0
volumetric_fog_temporal_reprojection_enabled = false
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_rhkkr"]
data = PackedVector3Array(-0.05, 0.05, 0.05, 0.05, 0.05, 0.05, -0.05, -0.05, 0.05, 0.05, 0.05, 0.05, 0.05, -0.05, 0.05, -0.05, -0.05, 0.05, 0.05, 0.05, -0.05, -0.05, 0.05, -0.05, 0.05, -0.05, -0.05, -0.05, 0.05, -0.05, -0.05, -0.05, -0.05, 0.05, -0.05, -0.05, 0.05, 0.05, 0.05, 0.05, 0.05, -0.05, 0.05, -0.05, 0.05, 0.05, 0.05, -0.05, 0.05, -0.05, -0.05, 0.05, -0.05, 0.05, -0.05, 0.05, -0.05, -0.05, 0.05, 0.05, -0.05, -0.05, -0.05, -0.05, 0.05, 0.05, -0.05, -0.05, 0.05, -0.05, -0.05, -0.05, 0.05, 0.05, 0.05, -0.05, 0.05, 0.05, 0.05, 0.05, -0.05, -0.05, 0.05, 0.05, -0.05, 0.05, -0.05, 0.05, 0.05, -0.05, -0.05, -0.05, 0.05, 0.05, -0.05, 0.05, -0.05, -0.05, -0.05, 0.05, -0.05, 0.05, 0.05, -0.05, -0.05, -0.05, -0.05, -0.05)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_chkel"]
emission_enabled = true
emission = Color(0.376471, 0.435294, 0.72549, 1)
[sub_resource type="BoxMesh" id="BoxMesh_nilbs"]
material = SubResource("StandardMaterial3D_chkel")
size = Vector3(0.1, 0.1, 0.1)
[sub_resource type="CapsuleMesh" id="CapsuleMesh_3d1gr"]
height = 3.703
@@ -82,24 +70,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0106132, -2.38419e-07, 0.31
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_mkdd8")
[node name="Lichtknopje" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.929229, 1.32078, -1.96962)
script = ExtResource("2_gwtwo")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Lichtknopje"]
shape = SubResource("ConcavePolygonShape3D_rhkkr")
[node name="Audio" type="AudioStreamPlayer3D" parent="Lichtknopje"]
transform = Transform3D(-0.999706, 0, 0.0242578, 0, 1, 0, -0.0242578, 0, -0.999706, 0, 0, 0)
stream = ExtResource("3_e26r5")
unit_size = 1.0
[node name="Mesh" type="MeshInstance3D" parent="Lichtknopje"]
mesh = SubResource("BoxMesh_nilbs")
skeleton = NodePath("../..")
[node name="Light" type="OmniLight3D" parent="Lichtknopje"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.929229, -0.07078, 1.96962)
[node name="Light" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.25, 0)
light_energy = 0.606
[node name="Slot" parent="." instance=ExtResource("4_kvwvq")]
@@ -138,6 +110,8 @@ transform = Transform3D(2.26464, 5.42931, -4.95637, -1.43552, 5.41298, 5.27357,
light_energy = 0.1
spot_angle = 25.0
[connection signal="input_event" from="Lichtknopje" to="Lichtknopje" method="_on_input_event"]
[node name="lichtkastje" parent="." instance=ExtResource("11_ayjqu")]
transform = Transform3D(2.38498e-09, 0, -0.2, 0, 0.2, 0, 0.2, 0, 2.38498e-09, -0.508201, 1.14343, -1.94739)
[connection signal="input_event" from="safe/FlashLight/FlashLight" to="Player" method="_on_flash_light_input_event"]
[connection signal="input_event" from="safe/FlashLight/FlashLight" to="safe" method="_on_flash_light_input_event"]
+1
View File
@@ -4,6 +4,7 @@ extends CharacterBody3D
const WALK_SPEED = 5.0
const MOUSE_SENS = 0.002
var has_flashlight = false
var has_key = false
var mouse_mode = 2
+6
View File
@@ -9,3 +9,9 @@ func _ready():
func _on_static_body_3d_input_event(camera, event, position, normal, shape_idx):
if event is InputEventMouseButton and event.is_action_pressed("interact"):
$Kast/Drawer.position.z = abs($Kast/Drawer.position.z - 1.0)
func _on_sleutel_input_event(camera, event, position, normal, shape_idx):
if event is InputEventMouseButton and event.is_action_pressed("interact"):
$Kast/Drawer/Sleutel.visible = false
get_node("../Player").has_key = true
+24
View File
@@ -0,0 +1,24 @@
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
func _on_lock_input_event(camera, event, position, normal, shape_idx):
if event is InputEventMouseButton and event.is_action_pressed("interact"):
if get_node("../Player").has_key:
$Deur.visible = false
$Lock.visible = false
func _on_lever_input_event(camera, event, position, normal, shape_idx):
if event is InputEventMouseButton and event.is_action_pressed("interact"):
$Lever.rotation.z = $Lever.rotation.z + 180
$".."/Light.visible = !$".."/Light.visible