Adds missing data

This commit is contained in:
Michel 2025-02-03 19:17:20 +01:00
parent e6391d9fdd
commit 53cdcc3433
620 changed files with 47293 additions and 151 deletions

View file

@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://c2h3negcbnqi"]
[ext_resource type="Script" path="res://prefabs/secret_trigger.gd" id="1_1yylx"]
[node name="SecretTrigger" type="Area3D"]
script = ExtResource("1_1yylx")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]

20
prefabs/death_handler.gd Normal file
View file

@ -0,0 +1,20 @@
extends Node
class_name DeathHandler
@export var camera: Node3D;
var enabled: bool = false
var targetDirection: Vector3;
func died(from: Node3D):
print(from, ' ', from.global_position)
enabled = true
var direction = (from.global_position - camera.global_position).normalized()
var previousForward = -camera.global_basis.z;
create_tween().tween_method(self.rotateToTarget.bind(direction, previousForward), 0.0, 1.0, 1.0).set_trans(Tween.TRANS_EXPO)
func rotateToTarget(weight:float, targetDirection: Vector3, previousForward: Vector3) -> void:
camera.look_at(lerp(camera.global_position + previousForward, camera.global_position + targetDirection, weight))

View file

@ -0,0 +1,5 @@
extends AudioStreamPlayer3D
func _on_finished() -> void:
self.queue_free()

View file

@ -0,0 +1,25 @@
extends AudioStreamPlayer3D
@export var threshold: float = 1.5
@export var targetElement: Node3D
var currentLocation: Vector3
var distance: float
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
currentLocation = targetElement.global_position
distance = threshold
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
var positionDistance = targetElement.global_position.distance_to(currentLocation)
currentLocation = targetElement.global_position
distance = distance - positionDistance
if (distance > 0):
return
distance = threshold
play()

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://ctu0cdqcefrwg"]
[gd_scene load_steps=17 format=3 uid="uid://ctu0cdqcefrwg"]
[ext_resource type="Script" path="res://scripts/player/player.gd" id="1_1tqna"]
[ext_resource type="Script" path="res://scripts/player/cameraController.gd" id="1_v2q4i"]
@ -6,7 +6,15 @@
[ext_resource type="Script" path="res://scripts/player/weapon.gd" id="4_nfpgt"]
[ext_resource type="PackedScene" uid="uid://bnwuklgcmgyw8" path="res://content/muzzleflash/muzzleflash.tscn" id="5_v58ob"]
[ext_resource type="Script" path="res://demo/agents/scripts/health.gd" id="6_ixo02"]
[ext_resource type="AudioStream" uid="uid://cn33abuyca8so" path="res://audio/gun/assaultrifle.tres" id="6_lf83g"]
[ext_resource type="PackedScene" uid="uid://bwnlcxfwxyj7j" path="res://content/ui/UI.tscn" id="7_qi8fi"]
[ext_resource type="Script" path="res://prefabs/death_handler.gd" id="8_h34n7"]
[ext_resource type="Script" path="res://prefabs/movement_player.gd" id="10_cd7pb"]
[ext_resource type="AudioStream" uid="uid://dq8k15jwlxhw" path="res://audio/footsteps/walk/footsteps_walking.tres" id="10_n5agh"]
[ext_resource type="AudioStream" uid="uid://c0c1k0gmcd4yb" path="res://audio/footsteps/sprint/footsteps_running.tres" id="12_l38x2"]
[ext_resource type="AudioStream" uid="uid://ba5iu681ldn1r" path="res://audio/startup/startup.tres" id="13_dc1a4"]
[ext_resource type="Script" path="res://prefabs/delete_after_play.gd" id="14_i2m1b"]
[ext_resource type="AudioStream" uid="uid://sisk81utsw72" path="res://audio/playerhit/playerhit.tres" id="15_5lcwc"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_w4dyg"]
margin = 0.332
@ -21,9 +29,10 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("CylinderShape3D_w4dyg")
[node name="Camera3D" type="Camera3D" parent="CollisionShape3D" node_paths=PackedStringArray("PlayerNode")]
process_mode = 3
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0.68094, 0)
keep_aspect = 0
fov = 66.5
current = true
fov = 70.0
script = ExtResource("1_v2q4i")
PlayerNode = NodePath("../..")
@ -34,70 +43,36 @@ MuzzleFlash = ExtResource("5_v58ob")
Origin = NodePath("LVA4_Armature/Skeleton3D/BoneAttachment3D/Plane/Muzzle")
BulletOrigin = NodePath("..")
[node name="LVA4_Armature" parent="CollisionShape3D/Camera3D/Weapon" index="0"]
transform = Transform3D(100, 0, 0, 0, 0, 100, 0, -100, 0, 1.48072e-08, 0, 0.169375)
[node name="Skeleton3D" parent="CollisionShape3D/Camera3D/Weapon/LVA4_Armature" index="0"]
bones/6/rotation = Quaternion(0.697459, -0.0272195, 0.0377435, 0.715112)
bones/6/scale = Vector3(1.01704, 0.970755, 1.01744)
bones/9/rotation = Quaternion(0.59753, 0.0883948, -0.0950469, 0.791272)
bones/9/scale = Vector3(0.895205, 1.24851, 0.895209)
bones/12/rotation = Quaternion(0.5, 0.5, 0.5, -0.5)
bones/13/rotation = Quaternion(-0.288794, -0.583705, 0.584114, 0.484456)
bones/14/rotation = Quaternion(0.847616, 0.123803, -0.0282024, 0.515193)
bones/15/rotation = Quaternion(-0.281539, -0.0718473, 0.00808318, 0.956822)
bones/17/rotation = Quaternion(-0.0979801, -0.0112315, 0.138692, 0.985413)
bones/18/rotation = Quaternion(0.00285996, -0.0771369, -0.0955664, 0.992426)
bones/19/rotation = Quaternion(-0.014737, 0.0372155, -0.0126211, 0.999119)
bones/23/rotation = Quaternion(0.0470606, 0.0222304, 0.674114, 0.736791)
bones/24/rotation = Quaternion(-0.0161525, -0.0078105, 0.43526, 0.900126)
bones/28/rotation = Quaternion(0.102228, 0.0657092, 0.694722, 0.708938)
bones/29/rotation = Quaternion(-0.0349312, -0.0131626, -0.00239495, 0.9993)
bones/33/rotation = Quaternion(0.0718133, 0.0329945, 0.409986, 0.908661)
bones/37/rotation = Quaternion(-0.0719948, 0.0990852, 0.535014, 0.835918)
bones/38/rotation = Quaternion(0.0321199, 0.0582583, 0.363318, 0.929287)
bones/40/rotation = Quaternion(0.0136756, -0.0172532, -0.0023784, 0.999755)
bones/42/rotation = Quaternion(0.0135645, -0.0568211, -0.00291822, 0.998288)
bones/44/rotation = Quaternion(0.0136133, -0.0399402, -0.00268841, 0.999106)
bones/46/rotation = Quaternion(0.8627, 0.184653, -0.263834, -0.389927)
bones/48/rotation = Quaternion(0.0136754, -0.0172533, -0.00237861, 0.999755)
bones/50/rotation = Quaternion(-0.0240424, -0.0253808, 0.0230706, 0.999122)
bones/52/rotation = Quaternion(9.57256e-08, -0.10147, 2.38067e-08, 0.994839)
bones/54/rotation = Quaternion(0.5, -0.5, -0.5, -0.5)
bones/55/rotation = Quaternion(-0.00966559, 0.431855, -0.779032, 0.454442)
bones/56/rotation = Quaternion(0.569151, -0.1247, -0.023923, 0.81237)
bones/57/rotation = Quaternion(-0.205716, -0.0320915, 0.116515, 0.971121)
bones/59/position = Vector3(5.26137e-06, 0.00062688, 4.61328e-06)
bones/59/rotation = Quaternion(-0.0921515, 0.0504243, 0.195935, 0.974974)
bones/60/rotation = Quaternion(-0.0504229, 0.0584449, -0.605684, 0.791952)
bones/61/rotation = Quaternion(0.0114703, -0.0383484, -0.608711, 0.792382)
bones/64/position = Vector3(-1.39906e-05, 0.000607789, 8.67999e-07)
bones/64/rotation = Quaternion(-0.0560437, 0.00556503, 0.0915036, 0.994211)
bones/65/rotation = Quaternion(0.0483554, -0.0192523, -0.71875, 0.693318)
bones/66/rotation = Quaternion(-0.0173623, 0.00452312, -0.601864, 0.798397)
bones/69/position = Vector3(1.30467e-06, 0.000602322, -2.7101e-06)
bones/69/rotation = Quaternion(0.0409456, -0.0210825, 0.0696472, 0.996508)
bones/70/rotation = Quaternion(0.0377608, -0.115509, -0.0908998, 0.988417)
bones/71/rotation = Quaternion(-0.0354375, -0.0117314, -0.626531, 0.778502)
bones/74/position = Vector3(-8.65025e-06, 0.000669554, 2.38656e-05)
bones/74/rotation = Quaternion(0.0945839, -0.108202, 0.236727, 0.960889)
bones/75/rotation = Quaternion(0.0550313, -0.0567217, -0.0538148, 0.995419)
bones/76/rotation = Quaternion(-0.0284048, -0.0472237, -0.149045, 0.987294)
bones/78/position = Vector3(-8.86769e-05, 0.000149522, 3.81398e-05)
bones/78/rotation = Quaternion(0.293949, 0.638458, 0.159887, 0.69311)
bones/79/rotation = Quaternion(-0.24679, -0.068873, -0.208296, 0.943909)
bones/80/rotation = Quaternion(0.0181542, -0.258237, 0.0705999, 0.963327)
bones/82/rotation = Quaternion(0.013728, -0.00687772, 0.0020478, 0.99988)
bones/84/rotation = Quaternion(0.0137617, -0.0217986, 0.00184283, 0.999666)
bones/86/rotation = Quaternion(0.0137452, -0.0144382, 0.0019441, 0.999799)
bones/88/rotation = Quaternion(0.8627, -0.184653, 0.263834, -0.389927)
bones/90/rotation = Quaternion(0.0137278, -0.00687766, 0.00204802, 0.99988)
bones/92/rotation = Quaternion(-0.0245858, 0.00136125, -0.0224883, 0.999444)
bones/94/rotation = Quaternion(2.7712e-09, 0.0456322, 4.00834e-08, 0.998958)
bones/96/position = Vector3(0.00148682, 0.00419669, -0.00257247)
bones/96/rotation = Quaternion(-0.664692, 0.0194188, 0.125885, 0.736179)
bones/98/position = Vector3(0.000566952, 0.00437002, -0.00361386)
bones/98/rotation = Quaternion(-0.687624, -0.153843, -0.170745, 0.688732)
bones/6/rotation = Quaternion(0.699082, -0.0275782, 0.0381791, 0.713489)
bones/9/rotation = Quaternion(0.598288, 0.0862358, -0.0928841, 0.791194)
bones/9/scale = Vector3(0.899362, 1.23607, 0.899366)
bones/13/rotation = Quaternion(-0.283862, -0.59042, 0.587465, 0.475091)
bones/14/rotation = Quaternion(0.845483, 0.123918, -0.0276912, 0.518687)
bones/15/rotation = Quaternion(-0.268192, -0.0524338, -0.0136426, 0.961841)
bones/40/rotation = Quaternion(0.013691, -0.0123893, -0.00231186, 0.999827)
bones/42/rotation = Quaternion(0.0136324, -0.0408477, -0.00269982, 0.999069)
bones/44/rotation = Quaternion(0.0136645, -0.0280867, -0.0025261, 0.999509)
bones/48/rotation = Quaternion(0.0136908, -0.0123894, -0.00231206, 0.999827)
bones/50/rotation = Quaternion(-0.0241645, -0.0205397, 0.0229569, 0.999233)
bones/52/rotation = Quaternion(9.57242e-08, -0.10117, 2.37787e-08, 0.994869)
bones/55/rotation = Quaternion(-0.0158395, 0.439327, -0.774392, 0.455035)
bones/56/rotation = Quaternion(0.574799, -0.124864, -0.0230532, 0.808383)
bones/57/rotation = Quaternion(-0.216828, -0.0109878, 0.105707, 0.970408)
bones/82/rotation = Quaternion(0.0137185, -0.00171057, 0.00211874, 0.999902)
bones/84/rotation = Quaternion(0.0137406, -0.00472083, 0.00207752, 0.999892)
bones/86/rotation = Quaternion(0.0137263, -0.0023118, 0.00211055, 0.999901)
bones/90/rotation = Quaternion(0.0137183, -0.00171051, 0.00211896, 0.999902)
bones/92/rotation = Quaternion(-0.0244656, 0.00660966, -0.0226152, 0.999423)
bones/94/rotation = Quaternion(2.80718e-09, 0.0447449, 4.00891e-08, 0.998999)
bones/96/rotation = Quaternion(-0.663965, 0.0366491, 0.106752, 0.739196)
bones/98/rotation = Quaternion(-0.691382, -0.135959, -0.188549, 0.684072)
[node name="BoneAttachment3D" parent="CollisionShape3D/Camera3D/Weapon/LVA4_Armature/Skeleton3D" index="1"]
transform = Transform3D(0.967405, -0.211612, -0.139095, 0.196587, 0.973809, -0.114238, 0.159626, 0.0831701, 0.983668, 0.00147876, 0.00257324, -0.00102415)
transform = Transform3D(0.974534, -0.206316, -0.0878506, 0.195862, 0.973921, -0.11452, 0.109187, 0.0943966, 0.989529, 0.00141857, 0.0025722, -0.00106618)
[node name="Muzzle" parent="CollisionShape3D/Camera3D/Weapon/LVA4_Armature/Skeleton3D/BoneAttachment3D/Plane" index="0"]
transform = Transform3D(0.00256023, 0.00111408, -0.00109729, 0.000993761, 0.00046617, 0.00279197, 0.00120734, -0.00274618, 2.87907e-05, -0.00118721, 0.00250132, 0.000390777)
@ -106,13 +81,53 @@ transform = Transform3D(0.00256023, 0.00111408, -0.00109729, 0.000993761, 0.0004
wait_time = 0.3
one_shot = true
[node name="ShootSound" type="AudioStreamPlayer3D" parent="CollisionShape3D/Camera3D/Weapon"]
stream = ExtResource("6_lf83g")
bus = &"Player"
[node name="Health" type="Node" parent="."]
script = ExtResource("6_ixo02")
max_health = 5.0
max_health = 1.0
[node name="Ui" parent="." instance=ExtResource("7_qi8fi")]
[node name="Enemy Target" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.32602, 0)
[node name="DeathHandler" type="Node" parent="." node_paths=PackedStringArray("camera")]
process_mode = 3
script = ExtResource("8_h34n7")
camera = NodePath("../CollisionShape3D/Camera3D")
[node name="Walking" type="AudioStreamPlayer3D" parent="." node_paths=PackedStringArray("targetElement")]
stream = ExtResource("10_n5agh")
bus = &"Player"
script = ExtResource("10_cd7pb")
threshold = 1.45
targetElement = NodePath("..")
[node name="Sprinting" type="AudioStreamPlayer3D" parent="." node_paths=PackedStringArray("targetElement")]
process_mode = 4
stream = ExtResource("12_l38x2")
bus = &"Player"
script = ExtResource("10_cd7pb")
threshold = 3.0
targetElement = NodePath("..")
[node name="Startup" type="AudioStreamPlayer3D" parent="."]
process_mode = 3
stream = ExtResource("13_dc1a4")
autoplay = true
bus = &"Player"
script = ExtResource("14_i2m1b")
[node name="HitSound" type="AudioStreamPlayer" parent="."]
process_mode = 3
stream = ExtResource("15_5lcwc")
volume_db = 2.907
pitch_scale = 1.04
bus = &"Player"
[connection signal="finished" from="Startup" to="Startup" method="_on_finished"]
[editable path="CollisionShape3D/Camera3D/Weapon"]

14
prefabs/secret_trigger.gd Normal file
View file

@ -0,0 +1,14 @@
extends Area3D
@export var SecretHandler: SecretHandler;
@export var TriggerID: String;
func _ready() -> void:
SecretHandler.registerTrigger(TriggerID)
self.body_entered.connect(self.player_entered)
func player_entered(body: Node3D) -> void:
if body is not Player:
return
SecretHandler.triggered(TriggerID)