Added suit

This commit is contained in:
Thomas Muller 2023-10-02 18:15:10 -04:00
parent 6337bdd9de
commit 941c661f6c
5 changed files with 60 additions and 3 deletions

View file

@ -33,7 +33,7 @@ size = Vector3(1, 1.5, 1)
script = ExtResource("1_omu2m")
[node name="Koob" type="CSGMesh3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.23446, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.21614, 0)
mesh = SubResource("BoxMesh_sbsxh")
material = SubResource("StandardMaterial3D_8bjqg")

25
Suit.gd Normal file
View file

@ -0,0 +1,25 @@
extends Area3D
@onready
var _grab_sound: AudioStreamPlayer3D = $GrabSound
@onready
var _voice = $VoiceOverlay
func _ready():
_grab_sound.finished.connect(_on_sound_finished)
_voice.finished.connect(_on_sound_finished)
func _on_body_entered(body):
if body.is_in_group('Players'):
hide()
_grab_sound.play()
_voice.play()
func _on_sound_finished():
# Make sure both sounds are done playing
if not _grab_sound.playing and not _voice.playing:
queue_free()

28
Suit.tscn Normal file
View file

@ -0,0 +1,28 @@
[gd_scene load_steps=6 format=3 uid="uid://dsio3s1m2uinu"]
[ext_resource type="Script" path="res://Suit.gd" id="1_mbmhc"]
[ext_resource type="AudioStream" uid="uid://dp021qbu4qpar" path="res://assets/sounds/button/button01_press.ogg" id="2_sy7ac"]
[ext_resource type="AudioStream" uid="uid://eycsn6ww81e3" path="res://assets/sounds/commentarynodes/thisisacommentarynode.ogg" id="3_hy7lp"]
[sub_resource type="CapsuleMesh" id="CapsuleMesh_2trlk"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_h8f8c"]
[node name="Suit" type="Area3D"]
script = ExtResource("1_mbmhc")
[node name="CSGMesh3D" type="CSGMesh3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
mesh = SubResource("CapsuleMesh_2trlk")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("CapsuleShape3D_h8f8c")
[node name="GrabSound" type="AudioStreamPlayer3D" parent="."]
stream = ExtResource("2_sy7ac")
[node name="VoiceOverlay" type="AudioStreamPlayer3D" parent="."]
stream = ExtResource("3_hy7lp")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

2
assets

@ -1 +1 @@
Subproject commit d1130c67c3da7ab7e2c774e51d77031e5f811569
Subproject commit f76fbef81dc93bc483d2b391f0cfe990d053af79

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=3 uid="uid://bp1fooevcl4lk"]
[gd_scene load_steps=14 format=3 uid="uid://bp1fooevcl4lk"]
[ext_resource type="ArrayMesh" uid="uid://cfm21e1rmsbvt" path="res://assets/maps/devworld.obj" id="1_67d5q"]
[ext_resource type="PackedScene" uid="uid://wl1n3y8mcq0x" path="res://Commentary.tscn" id="2_3gk04"]
@ -9,6 +9,7 @@
[ext_resource type="AudioStream" uid="uid://dp021qbu4qpar" path="res://assets/sounds/button/button01_press.ogg" id="6_lyhss"]
[ext_resource type="PackedScene" uid="uid://cjn7bvtws2uip" path="res://Door.tscn" id="7_0wker"]
[ext_resource type="AudioStream" uid="uid://bax4jgji3htgh" path="res://assets/sounds/button/button01_release.ogg" id="7_ydre8"]
[ext_resource type="PackedScene" uid="uid://dsio3s1m2uinu" path="res://Suit.tscn" id="10_p6k47"]
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_iw8bi"]
data = PackedVector3Array(-504, -128, 256, -504, -128, 128, -504, -256, 128, -504, -256, 256, -504, -128, 256, -504, -256, 128, -504, -128, 256, -512, -128, 256, -512, -128, 128, -504, -128, 128, -504, -128, 256, -512, -128, 128, -504, -128, 256, -504, -256, 256, -512, -256, 256, -512, -128, 256, -504, -128, 256, -512, -256, 256, -504, -128, 128, -512, -128, 128, -512, -256, 128, -504, -256, 128, -504, -128, 128, -512, -256, 128, -504, -256, 256, -504, -256, 128, -512, -256, 128, -512, -256, 256, -504, -256, 256, -512, -256, 128, -512, -128, 256, -512, -256, 256, -512, -256, 128, -512, -128, 128, -512, -128, 256, -512, -256, 128, -504, 0, 256, -504, 0, 128, -504, -128, 128, -504, -128, 256, -504, 0, 256, -504, -128, 128, -504, 0, 256, -512, 0, 256, -512, 0, 128, -504, 0, 128, -504, 0, 256, -512, 0, 128, -504, 0, 256, -504, -128, 256, -512, -128, 256, -512, 0, 256, -504, 0, 256, -512, -128, 256, -504, 0, 128, -512, 0, 128, -512, -128, 128, -504, -128, 128, -504, 0, 128, -512, -128, 128, -504, -128, 256, -504, -128, 128, -512, -128, 128, -512, -128, 256, -504, -128, 256, -512, -128, 128, -512, 0, 256, -512, -128, 256, -512, -128, 128, -512, 0, 128, -512, 0, 256, -512, -128, 128, -128, 64, 8, -128, 64, 0, -128, -320, 0, -128, -320, 8, -128, 64, 8, -128, -320, 0, -128, 64, 8, -512, 64, 8, -512, 64, 0, -128, 64, 0, -128, 64, 8, -512, 64, 0, -128, 64, 8, -128, -320, 8, -512, -320, 8, -512, 64, 8, -128, 64, 8, -512, -320, 8, -128, 64, 0, -512, 64, 0, -512, -320, 0, -128, -320, 0, -128, 64, 0, -512, -320, 0, -128, -320, 8, -128, -320, 0, -512, -320, 0, -512, -320, 8, -128, -320, 8, -512, -320, 0, -512, 64, 8, -512, -320, 8, -512, -320, 0, -512, 64, 0, -512, 64, 8, -512, -320, 0, -512, 64, 392, -512, 64, 8, -512, -320, 8, -512, -320, 392, -512, 64, 392, -512, -320, 8, -512, 64, 392, -520, 64, 392, -520, 64, 8, -512, 64, 8, -512, 64, 392, -520, 64, 8, -512, 64, 392, -512, -320, 392, -520, -320, 392, -520, 64, 392, -512, 64, 392, -520, -320, 392, -512, 64, 8, -520, 64, 8, -520, -320, 8, -512, -320, 8, -512, 64, 8, -520, -320, 8, -520, 64, 392, -520, -320, 392, -520, -320, 8, -520, 64, 8, -520, 64, 392, -520, -320, 8, -512, -320, 392, -512, -320, 8, -520, -320, 8, -520, -320, 392, -512, -320, 392, -520, -320, 8, 512, 1024, 416, 512, 1024, 96, 512, 1016, 96, 512, 1016, 416, 512, 1024, 416, 512, 1016, 96, 512, 1016, 96, 512, 1024, 96, 512, 1016, 0, 512, 1024, 96, 512, 1024, 0, 512, 1016, 0, -512, 1024, 96, 512, 1024, 96, 512, 1024, 416, 512, 1024, 96, 16, 1024, 96, 16, 1024, 0, 512, 1024, 96, 16, 1024, 0, 512, 1024, 0, -512, 1024, 96, 512, 1024, 416, -512, 1024, 416, -32, 1024, 96, -512, 1024, 96, -512, 1024, 0, -32, 1024, 96, -512, 1024, 0, -32, 1024, 0, 512, 1024, 96, 512, 1016, 96, 16, 1016, 96, 16, 1024, 96, 512, 1024, 96, 16, 1016, 96, 512, 1024, 0, 16, 1024, 0, 16, 1016, 0, 512, 1016, 0, 512, 1024, 0, 16, 1016, 0, 512, 1016, 416, 512, 1016, 96, -512, 1016, 96, 512, 1016, 96, 512, 1016, 0, 16, 1016, 0, 512, 1016, 96, 16, 1016, 0, 16, 1016, 96, 512, 1016, 416, -512, 1016, 96, -512, 1016, 416, -512, 1016, 0, -512, 1016, 96, -32, 1016, 96, -512, 1016, 0, -32, 1016, 96, -32, 1016, 0, 16, 1024, 96, 16, 1016, 96, 16, 1016, 0, 16, 1024, 0, 16, 1024, 96, 16, 1016, 0, -32, 1024, 96, -32, 1024, 0, -32, 1016, 0, -32, 1016, 96, -32, 1024, 96, -32, 1016, 0, 512, 1024, 416, 512, 1016, 416, -512, 1016, 416, -512, 1024, 416, 512, 1024, 416, -512, 1016, 416, -32, 1024, 96, -32, 1016, 96, -512, 1016, 96, -512, 1024, 96, -32, 1024, 96, -512, 1016, 96, 512, 1024, 96, -512, 1024, 96, -512, 1016, 96, 512, 1016, 96, 512, 1024, 96, -512, 1016, 96, -512, 1024, 416, -512, 1016, 416, -512, 1016, 96, -512, 1024, 96, -512, 1024, 416, -512, 1016, 96, -512, 1024, 96, -512, 1016, 96, -512, 1016, 0, -512, 1024, 0, -512, 1024, 96, -512, 1016, 0, -32, 1024, 0, -512, 1024, 0, -512, 1016, 0, -32, 1016, 0, -32, 1024, 0, -512, 1016, 0, 1024, 1024, 0, 1024, 1024, -64, 1024, -1024, -64, 1024, -1024, 0, 1024, 1024, 0, 1024, -1024, -64, 1024, 1024, 0, -1024, 1024, 0, -1024, 1024, -64, 1024, 1024, -64, 1024, 1024, 0, -1024, 1024, -64, 1024, 1024, 0, 1024, -1024, 0, -1024, -1024, 0, -1024, 1024, 0, 1024, 1024, 0, -1024, -1024, 0, 1024, 1024, -64, -1024, 1024, -64, -1024, -1024, -64, 1024, -1024, -64, 1024, 1024, -64, -1024, -1024, -64, 1024, -1024, 0, 1024, -1024, -64, -1024, -1024, -64, -1024, -1024, 0, 1024, -1024, 0, -1024, -1024, -64, -1024, 1024, 0, -1024, -1024, 0, -1024, -1024, -64, -1024, 1024, -64, -1024, 1024, 0, -1024, -1024, -64)
@ -61,3 +62,6 @@ spot_angle = 35.8279
[node name="Door" parent="." instance=ExtResource("7_0wker")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.32, 0, -40.8083)
autoclose_time = 2.0
[node name="Suit" parent="." instance=ExtResource("10_p6k47")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.04, 0.32, 5.12)