This commit is contained in:
Spencer Killen 2023-08-20 17:27:14 -06:00
commit d4caed7c8d
Signed by: sjkillen
GPG Key ID: F307025B65C860BA
5 changed files with 29 additions and 10 deletions

View File

@ -22,10 +22,10 @@
[ext_resource type="PackedScene" uid="uid://c4s6y758n77lw" path="res://villager_shared.tscn" id="24_ddfvk"] [ext_resource type="PackedScene" uid="uid://c4s6y758n77lw" path="res://villager_shared.tscn" id="24_ddfvk"]
[ext_resource type="PackedScene" uid="uid://b3aus2kigf8xt" path="res://Models/beach_decor/cooler.tscn" id="24_sl7ne"] [ext_resource type="PackedScene" uid="uid://b3aus2kigf8xt" path="res://Models/beach_decor/cooler.tscn" id="24_sl7ne"]
[ext_resource type="PackedScene" uid="uid://cft26nug7kyqb" path="res://ambient_light_1.tscn" id="25_novxt"] [ext_resource type="PackedScene" uid="uid://cft26nug7kyqb" path="res://ambient_light_1.tscn" id="25_novxt"]
[ext_resource type="PackedScene" uid="uid://ukful430mmkn" path="res://color_cube.tscn" id="25_rm0cr"] [ext_resource type="PackedScene" path="res://color_cube.tscn" id="25_rm0cr"]
[ext_resource type="PackedScene" uid="uid://d2pvg0f5jtpve" path="res://slime_kill_box.tscn" id="27_cjxk6"] [ext_resource type="PackedScene" path="res://slime_kill_box.tscn" id="27_cjxk6"]
[ext_resource type="PackedScene" uid="uid://bw3k2c75qavce" path="res://Models/beach_decor/bucket.tscn" id="27_f3p1i"] [ext_resource type="PackedScene" uid="uid://bw3k2c75qavce" path="res://Models/beach_decor/bucket.tscn" id="27_f3p1i"]
[ext_resource type="PackedScene" uid="uid://6ycop5t3nra5" path="res://Level/World/DayNightEnvironment.tscn" id="27_jutn4"] [ext_resource type="PackedScene" path="res://Level/World/DayNightEnvironment.tscn" id="27_jutn4"]
[ext_resource type="PackedScene" uid="uid://g4gmc0pwlak1" path="res://Models/buildings/fence.tscn" id="28_prydb"] [ext_resource type="PackedScene" uid="uid://g4gmc0pwlak1" path="res://Models/buildings/fence.tscn" id="28_prydb"]
[ext_resource type="PackedScene" uid="uid://ckbba1bs71tl" path="res://crate.tscn" id="28_x0lrj"] [ext_resource type="PackedScene" uid="uid://ckbba1bs71tl" path="res://crate.tscn" id="28_x0lrj"]
[ext_resource type="PackedScene" path="res://spawner.tscn" id="29_etvc6"] [ext_resource type="PackedScene" path="res://spawner.tscn" id="29_etvc6"]

View File

@ -33,13 +33,13 @@ colors = Array[Color]([Color(0, 0.113725, 0.905882, 1), Color(0.592157, 0, 0.243
transform = Transform3D(0.859505, 0, -0.511128, 0, 1, 0, 0.511128, 0, 0.859505, 0, 0, 0) transform = Transform3D(0.859505, 0, -0.511128, 0, 1, 0, 0.511128, 0, 0.859505, 0, 0, 0)
[node name="Skeleton3D" parent="Armature" index="0"] [node name="Skeleton3D" parent="Armature" index="0"]
bones/1/position = Vector3(0, 0.524146, 0) bones/1/position = Vector3(0, 0.421476, 0)
bones/2/rotation = Quaternion(-0.0627444, 0.00212883, -0.213248, 0.974979) bones/2/rotation = Quaternion(-0.0627444, 0.00212883, -0.213248, 0.974979)
bones/3/rotation = Quaternion(0.100834, -0.698956, 0.0125015, 0.707911) bones/3/rotation = Quaternion(0.100834, -0.698956, 0.0125015, 0.707911)
bones/7/rotation = Quaternion(-0.159059, 2.64275e-09, 2.49063e-09, 0.987269) bones/7/rotation = Quaternion(-0.257687, 2.32309e-09, 2.75415e-09, 0.966228)
bones/8/rotation = Quaternion(0.508626, -9.69284e-10, -1.41707e-10, 0.860988) bones/8/rotation = Quaternion(0.19232, -9.0028e-10, -4.74124e-10, 0.981332)
bones/10/rotation = Quaternion(0.123797, -4.82599e-08, -1.10949e-08, 0.992308) bones/10/rotation = Quaternion(0.252279, -5.58669e-08, -5.78452e-08, 0.967654)
bones/11/rotation = Quaternion(-0.528012, 9.67252e-08, 1.19389e-07, 0.849237) bones/11/rotation = Quaternion(-0.195486, 7.54015e-08, 2.81945e-08, 0.980707)
[node name="AnimationTree" type="AnimationTree" parent="." index="2"] [node name="AnimationTree" type="AnimationTree" parent="." index="2"]
tree_root = SubResource("AnimationNodeStateMachine_prt7l") tree_root = SubResource("AnimationNodeStateMachine_prt7l")

View File

@ -9,6 +9,11 @@ var is_villager = true
var hp = 100 var hp = 100
var aggressor var aggressor
func _ready():
super._ready()
$SoundTimer.wait_time = rng.randi_range(15, 65)
$SoundTimer.start()
func _process(delta): func _process(delta):
super._process(delta) super._process(delta)
@ -67,3 +72,9 @@ func _on_collision_detection_body_entered(body):
if "is_cultist" in body: if "is_cultist" in body:
aggressor = body as Cultist aggressor = body as Cultist
task = "become_corrupted" task = "become_corrupted"
func _on_sound_timer_timeout():
$happyslime.play()
$SoundTimer.wait_time = rng.randi_range(15, 65)
$SoundTimer.start()

View File

@ -25,7 +25,7 @@ shape = SubResource("CapsuleShape3D_kb4ms")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.389874, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.389874, 0)
[node name="PlayerCam" type="Camera3D" parent="CameraMount"] [node name="PlayerCam" type="Camera3D" parent="CameraMount"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.930216) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.643936)
fov = 50.0 fov = 50.0
[node name="Holster" type="Node3D" parent="."] [node name="Holster" type="Node3D" parent="."]

View File

@ -1,7 +1,8 @@
[gd_scene load_steps=5 format=3 uid="uid://c4s6y758n77lw"] [gd_scene load_steps=6 format=3 uid="uid://c4s6y758n77lw"]
[ext_resource type="PackedScene" uid="uid://dmtmign72vtlm" path="res://slime_shared.tscn" id="1_qm1jp"] [ext_resource type="PackedScene" uid="uid://dmtmign72vtlm" path="res://slime_shared.tscn" id="1_qm1jp"]
[ext_resource type="Script" path="res://Villager.gd" id="2_uf6mh"] [ext_resource type="Script" path="res://Villager.gd" id="2_uf6mh"]
[ext_resource type="AudioStream" uid="uid://djbuw33cr12i" path="res://Sounds/happyslime.ogg" id="3_v720k"]
[sub_resource type="SphereShape3D" id="SphereShape3D_k5rhc"] [sub_resource type="SphereShape3D" id="SphereShape3D_k5rhc"]
radius = 0.055 radius = 0.055
@ -23,4 +24,11 @@ shape = SubResource("SphereShape3D_k5rhc")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" index="0"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" index="0"]
shape = SubResource("SphereShape3D_wx128") shape = SubResource("SphereShape3D_wx128")
[node name="SoundTimer" type="Timer" parent="." index="5"]
wait_time = 45.0
[node name="happyslime" type="AudioStreamPlayer3D" parent="." index="6"]
stream = ExtResource("3_v720k")
[connection signal="body_entered" from="Area3D" to="." method="_on_area_3d_body_entered"] [connection signal="body_entered" from="Area3D" to="." method="_on_area_3d_body_entered"]
[connection signal="timeout" from="SoundTimer" to="." method="_on_sound_timer_timeout"]