Compare commits
4 Commits
1a6a94d02b
...
ecaf0fcf68
| Author | SHA1 | Date | |
|---|---|---|---|
| ecaf0fcf68 | |||
| 55cc2e7653 | |||
| 0d055cf39a | |||
| abc319836f |
File diff suppressed because one or more lines are too long
18
Assets/Objects/Key.tscn
Normal file
18
Assets/Objects/Key.tscn
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://caej6l75lgmkp"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://Assets/scripts/generator_key.gd" id="1_biiwx"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://byuejbs64ow32" path="res://Blender Files/Objects/Key.blend" id="1_kvtkd"]
|
||||||
|
|
||||||
|
[sub_resource type="BoxShape3D" id="BoxShape3D_e8fvw"]
|
||||||
|
size = Vector3(0.0746536, 0.0574341, 0.116943)
|
||||||
|
|
||||||
|
[node name="StaticBody3D" type="StaticBody3D"]
|
||||||
|
collision_layer = 4
|
||||||
|
script = ExtResource("1_biiwx")
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.000476837, 0.0148621, -0.0220947)
|
||||||
|
shape = SubResource("BoxShape3D_e8fvw")
|
||||||
|
|
||||||
|
[node name="Key" parent="." instance=ExtResource("1_kvtkd")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00731428, 0)
|
||||||
@ -1,17 +1,18 @@
|
|||||||
[gd_scene load_steps=7 format=3 uid="uid://bpc015tk4ehtg"]
|
[gd_scene load_steps=10 format=3 uid="uid://bpc015tk4ehtg"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Assets/scripts/Generator Panel.gd" id="1_i8xx2"]
|
[ext_resource type="Script" path="res://Assets/scripts/Generator Panel.gd" id="1_i8xx2"]
|
||||||
[ext_resource type="PackedScene" uid="uid://r4bpij06p34a" path="res://Blender Files/Objects/GeneratorPanel.blend" id="2_4k7uo"]
|
[ext_resource type="PackedScene" uid="uid://r4bpij06p34a" path="res://Blender Files/Objects/GeneratorPanel.blend" id="2_4k7uo"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://byuejbs64ow32" path="res://Blender Files/Objects/Key.blend" id="3_5j477"]
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_xn70b"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_wv34i"]
|
||||||
size = Vector3(0.322693, 0.569824, 0.078186)
|
size = Vector3(0.325256, 0.569397, 0.0860596)
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_5a75i"]
|
[sub_resource type="Animation" id="Animation_5a75i"]
|
||||||
resource_name = "Press"
|
resource_name = "Press"
|
||||||
tracks/0/type = "bezier"
|
tracks/0/type = "bezier"
|
||||||
tracks/0/imported = false
|
tracks/0/imported = false
|
||||||
tracks/0/enabled = true
|
tracks/0/enabled = true
|
||||||
tracks/0/path = NodePath("GeneratorPanel/Circle:blend_shapes/ButtonPressed")
|
tracks/0/path = NodePath("GeneratorPanel/Button:blend_shapes/ButtonPressed")
|
||||||
tracks/0/interp = 1
|
tracks/0/interp = 1
|
||||||
tracks/0/loop_wrap = true
|
tracks/0/loop_wrap = true
|
||||||
tracks/0/keys = {
|
tracks/0/keys = {
|
||||||
@ -25,7 +26,7 @@ length = 0.001
|
|||||||
tracks/0/type = "bezier"
|
tracks/0/type = "bezier"
|
||||||
tracks/0/imported = false
|
tracks/0/imported = false
|
||||||
tracks/0/enabled = true
|
tracks/0/enabled = true
|
||||||
tracks/0/path = NodePath("GeneratorPanel/Circle:blend_shapes/ButtonPressed")
|
tracks/0/path = NodePath("Key:position:x")
|
||||||
tracks/0/interp = 1
|
tracks/0/interp = 1
|
||||||
tracks/0/loop_wrap = true
|
tracks/0/loop_wrap = true
|
||||||
tracks/0/keys = {
|
tracks/0/keys = {
|
||||||
@ -33,19 +34,187 @@ tracks/0/keys = {
|
|||||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
||||||
"times": PackedFloat32Array(0)
|
"times": PackedFloat32Array(0)
|
||||||
}
|
}
|
||||||
|
tracks/1/type = "bezier"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("Key:position:y")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0),
|
||||||
|
"points": PackedFloat32Array(0.108054, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(0)
|
||||||
|
}
|
||||||
|
tracks/2/type = "bezier"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("Key:position:z")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0),
|
||||||
|
"points": PackedFloat32Array(0.283752, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(0)
|
||||||
|
}
|
||||||
|
tracks/3/type = "bezier"
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/path = NodePath("Key:rotation:x")
|
||||||
|
tracks/3/interp = 1
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0),
|
||||||
|
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(0)
|
||||||
|
}
|
||||||
|
tracks/4/type = "bezier"
|
||||||
|
tracks/4/imported = false
|
||||||
|
tracks/4/enabled = true
|
||||||
|
tracks/4/path = NodePath("Key:rotation:y")
|
||||||
|
tracks/4/interp = 1
|
||||||
|
tracks/4/loop_wrap = true
|
||||||
|
tracks/4/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0),
|
||||||
|
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(0)
|
||||||
|
}
|
||||||
|
tracks/5/type = "bezier"
|
||||||
|
tracks/5/imported = false
|
||||||
|
tracks/5/enabled = true
|
||||||
|
tracks/5/path = NodePath("Key:rotation:z")
|
||||||
|
tracks/5/interp = 1
|
||||||
|
tracks/5/loop_wrap = true
|
||||||
|
tracks/5/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0),
|
||||||
|
"points": PackedFloat32Array(-1.5708, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(0)
|
||||||
|
}
|
||||||
|
tracks/6/type = "value"
|
||||||
|
tracks/6/imported = false
|
||||||
|
tracks/6/enabled = true
|
||||||
|
tracks/6/path = NodePath("Key:position")
|
||||||
|
tracks/6/interp = 1
|
||||||
|
tracks/6/loop_wrap = true
|
||||||
|
tracks/6/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector3(0, 0.108054, 0.0242537)]
|
||||||
|
}
|
||||||
|
tracks/7/type = "bezier"
|
||||||
|
tracks/7/imported = false
|
||||||
|
tracks/7/enabled = true
|
||||||
|
tracks/7/path = NodePath("GeneratorPanel/Button:blend_shapes/ButtonPressed")
|
||||||
|
tracks/7/interp = 1
|
||||||
|
tracks/7/loop_wrap = true
|
||||||
|
tracks/7/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0),
|
||||||
|
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_wkhlx"]
|
||||||
|
resource_name = "InsertKey"
|
||||||
|
length = 2.0
|
||||||
|
tracks/0/type = "bezier"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Key:position:x")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0, 0),
|
||||||
|
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(0, 1)
|
||||||
|
}
|
||||||
|
tracks/1/type = "bezier"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("Key:position:y")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0, 0),
|
||||||
|
"points": PackedFloat32Array(0.108054, -0.25, 0, 0.25, 0, 0.108054, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(0, 1)
|
||||||
|
}
|
||||||
|
tracks/2/type = "bezier"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("Key:position:z")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0, 0),
|
||||||
|
"points": PackedFloat32Array(0.283752, -0.25, 0, 0.25, 0, 0.109834, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(0, 1)
|
||||||
|
}
|
||||||
|
tracks/3/type = "bezier"
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/path = NodePath("Key:rotation:x")
|
||||||
|
tracks/3/interp = 1
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0, 0),
|
||||||
|
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(1, 2)
|
||||||
|
}
|
||||||
|
tracks/4/type = "bezier"
|
||||||
|
tracks/4/imported = false
|
||||||
|
tracks/4/enabled = true
|
||||||
|
tracks/4/path = NodePath("Key:rotation:y")
|
||||||
|
tracks/4/interp = 1
|
||||||
|
tracks/4/loop_wrap = true
|
||||||
|
tracks/4/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0, 0),
|
||||||
|
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(1, 2)
|
||||||
|
}
|
||||||
|
tracks/5/type = "bezier"
|
||||||
|
tracks/5/imported = false
|
||||||
|
tracks/5/enabled = true
|
||||||
|
tracks/5/path = NodePath("Key:rotation:z")
|
||||||
|
tracks/5/interp = 1
|
||||||
|
tracks/5/loop_wrap = true
|
||||||
|
tracks/5/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0, 0),
|
||||||
|
"points": PackedFloat32Array(-1.5708, -0.25, 0, 0.25, 0, -3.14159, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(1, 2)
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_hqjxv"]
|
||||||
|
resource_name = "NoKey"
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Key:position")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector3(0, 0.108054, 0.0242537)]
|
||||||
|
}
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ed3dm"]
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ed3dm"]
|
||||||
_data = {
|
_data = {
|
||||||
|
"InsertKey": SubResource("Animation_wkhlx"),
|
||||||
|
"NoKey": SubResource("Animation_hqjxv"),
|
||||||
"Press": SubResource("Animation_5a75i"),
|
"Press": SubResource("Animation_5a75i"),
|
||||||
"RESET": SubResource("Animation_qkow4")
|
"RESET": SubResource("Animation_qkow4")
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="StaticBody3D" type="StaticBody3D"]
|
[node name="StaticBody3D" type="StaticBody3D"]
|
||||||
|
collision_layer = 4
|
||||||
script = ExtResource("1_i8xx2")
|
script = ExtResource("1_i8xx2")
|
||||||
|
promt_message = "Insert Key"
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.000640869, 0.0495605, 0.0411072)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.000396729, 0.0523376, 0.0473022)
|
||||||
shape = SubResource("BoxShape3D_xn70b")
|
shape = SubResource("BoxShape3D_wv34i")
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
libraries = {
|
libraries = {
|
||||||
@ -53,6 +222,9 @@ libraries = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[node name="GeneratorPanel" parent="." instance=ExtResource("2_4k7uo")]
|
[node name="GeneratorPanel" parent="." instance=ExtResource("2_4k7uo")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.0453592)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.0447993)
|
||||||
|
|
||||||
|
[node name="Key" parent="." instance=ExtResource("3_5j477")]
|
||||||
|
transform = Transform3D(-4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, 0, 0.108054, 0.0242537)
|
||||||
|
|
||||||
[editable path="GeneratorPanel"]
|
[editable path="GeneratorPanel"]
|
||||||
|
|||||||
@ -1,10 +1,17 @@
|
|||||||
extends StaticBody3D
|
extends StaticBody3D
|
||||||
|
signal Generator_Started
|
||||||
|
|
||||||
@export var promt_message:String = "press e"
|
@export var promt_message:String = "press e"
|
||||||
@export var promt_key:String
|
@export var promt_key:String
|
||||||
|
|
||||||
signal Generator_Started
|
@onready var animate = $AnimationPlayer
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
animate.play("NoKey")
|
||||||
|
|
||||||
func interact(player):
|
func interact(player):
|
||||||
$AnimationPlayer.play("Press")
|
print("Panel pressed")
|
||||||
|
if GlobalSettings.HasGeneratorKey:
|
||||||
|
animate.play("InsertKey")
|
||||||
|
animate.play("Press")
|
||||||
emit_signal("Generator_Started")
|
emit_signal("Generator_Started")
|
||||||
|
|||||||
9
Assets/scripts/generator_key.gd
Normal file
9
Assets/scripts/generator_key.gd
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
extends StaticBody3D
|
||||||
|
|
||||||
|
@export var promt_message:String = "Pickup Key"
|
||||||
|
@export var promt_key:String
|
||||||
|
|
||||||
|
func interact(player):
|
||||||
|
GlobalSettings.HasGeneratorKey = true
|
||||||
|
#Play Pickup sound
|
||||||
|
queue_free()
|
||||||
@ -10,6 +10,7 @@ var current_map = ""
|
|||||||
var SpawnPoint:Vector3
|
var SpawnPoint:Vector3
|
||||||
var Player_Last_Location = Vector3(0,0,0)
|
var Player_Last_Location = Vector3(0,0,0)
|
||||||
|
|
||||||
|
var HasGeneratorKey = false
|
||||||
|
|
||||||
func SetCurrentMap(selected_map):
|
func SetCurrentMap(selected_map):
|
||||||
current_map = selected_map
|
current_map = selected_map
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
BIN
Blender Files/Objects/Key.blend
Normal file
BIN
Blender Files/Objects/Key.blend
Normal file
Binary file not shown.
50
Blender Files/Objects/Key.blend.import
Normal file
50
Blender Files/Objects/Key.blend.import
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="scene"
|
||||||
|
importer_version=1
|
||||||
|
type="PackedScene"
|
||||||
|
uid="uid://byuejbs64ow32"
|
||||||
|
path="res://.godot/imported/Key.blend-24d3ab0fd405c7947ac651fe7098f890.scn"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Blender Files/Objects/Key.blend"
|
||||||
|
dest_files=["res://.godot/imported/Key.blend-24d3ab0fd405c7947ac651fe7098f890.scn"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
nodes/root_type=""
|
||||||
|
nodes/root_name=""
|
||||||
|
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
|
||||||
|
meshes/force_disable_compression=false
|
||||||
|
skins/use_named_skins=true
|
||||||
|
animation/import=true
|
||||||
|
animation/fps=30
|
||||||
|
animation/trimming=false
|
||||||
|
animation/remove_immutable_tracks=true
|
||||||
|
import_script/path=""
|
||||||
|
_subresources={}
|
||||||
|
gltf/naming_version=1
|
||||||
|
gltf/embedded_image_handling=1
|
||||||
|
blender/nodes/visible=0
|
||||||
|
blender/nodes/punctual_lights=true
|
||||||
|
blender/nodes/cameras=true
|
||||||
|
blender/nodes/custom_properties=true
|
||||||
|
blender/nodes/modifiers=1
|
||||||
|
blender/meshes/colors=false
|
||||||
|
blender/meshes/uvs=true
|
||||||
|
blender/meshes/normals=true
|
||||||
|
blender/meshes/tangents=true
|
||||||
|
blender/meshes/skins=2
|
||||||
|
blender/meshes/export_bones_deforming_mesh_only=false
|
||||||
|
blender/materials/unpack_enabled=true
|
||||||
|
blender/materials/export_materials=1
|
||||||
|
blender/animation/limit_playback=true
|
||||||
|
blender/animation/always_sample=true
|
||||||
|
blender/animation/group_tracks=true
|
||||||
BIN
Blender Files/Objects/Key.blend1
Normal file
BIN
Blender Files/Objects/Key.blend1
Normal file
Binary file not shown.
Reference in New Issue
Block a user