This commit is contained in:
Spencer Killen 2023-08-20 16:52:31 -06:00
commit d82a4cc483
Signed by: sjkillen
GPG Key ID: F307025B65C860BA
6 changed files with 57 additions and 17 deletions

View File

@ -1,8 +1,9 @@
[gd_scene load_steps=6 format=3 uid="uid://cdm267rtmop75"]
[gd_scene load_steps=7 format=3 uid="uid://cdm267rtmop75"]
[ext_resource type="PackedScene" uid="uid://c4s6y758n77lw" path="res://villager_shared.tscn" id="1_6uu34"]
[ext_resource type="PackedScene" uid="uid://7utef1nnena8" path="res://player.tscn" id="1_jbc4n"]
[ext_resource type="PackedScene" uid="uid://e0s4phx2jiit" path="res://cultist.tscn" id="3_renxb"]
[ext_resource type="PackedScene" uid="uid://d0uw7ykhb1cx8" path="res://spawner.tscn" id="4_ib8u6"]
[sub_resource type="CylinderMesh" id="CylinderMesh_c2b6h"]
top_radius = 80.23
@ -32,3 +33,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.87818, 2, 0.191837)
[node name="Player" parent="." instance=ExtResource("1_jbc4n")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.140476, 0.999999, 1.27725)
[node name="Node3D" parent="." instance=ExtResource("4_ib8u6")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 3)

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=33 format=3 uid="uid://3d51hjh2st8a"]
[gd_scene load_steps=34 format=3 uid="uid://3d51hjh2st8a"]
[ext_resource type="PackedScene" uid="uid://d2d4uv7o5gx5p" path="res://Level/World/screen_shader.tscn" id="1_huyen"]
[ext_resource type="PackedScene" uid="uid://d3ccrfjpg4hbv" path="res://Models/palm_curved.tscn" id="3_bth2b"]
@ -22,12 +22,13 @@
[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://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" uid="uid://d2pvg0f5jtpve" path="res://slime_kill_box.tscn" id="27_cjxk6"]
[ext_resource type="PackedScene" path="res://color_cube.tscn" id="25_rm0cr"]
[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://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://ckbba1bs71tl" path="res://crate.tscn" id="28_x0lrj"]
[ext_resource type="PackedScene" path="res://crate.tscn" id="28_x0lrj"]
[ext_resource type="PackedScene" uid="uid://d0uw7ykhb1cx8" path="res://spawner.tscn" id="29_etvc6"]
[sub_resource type="Animation" id="Animation_jpnyu"]
resource_name = "waves"
@ -491,7 +492,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.75088, 2.39766, -4.28161)
[node name="Crate4" parent="." instance=ExtResource("28_x0lrj")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.31447, 2.55588, -2.13044)
[node name="Timer" type="Timer" parent="."]
[node name="Node3D" parent="." instance=ExtResource("29_etvc6")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.41845, 9.26863, -2.62281)
[connection signal="finished" from="Music" to="Music" method="_on_finished"]
[connection signal="timeout" from="Music/Transition" to="Music" method="_on_transition_timer_timeout"]

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=42 format=3 uid="uid://bgoo1lbt28na"]
[gd_scene load_steps=41 format=3 uid="uid://bgoo1lbt28na"]
[ext_resource type="PackedScene" uid="uid://bhanbx2dyhv2d" path="res://Models/grape_man.glb" id="1_fh5yr"]
[ext_resource type="Script" path="res://Models/grape_man.gd" id="2_ksje8"]
@ -6,7 +6,6 @@
[ext_resource type="AudioStream" uid="uid://baocyd0p3jcku" path="res://Sounds/pickup_grunt.ogg" id="4_nvurj"]
[ext_resource type="AudioStream" uid="uid://b80t5xqckjoqk" path="res://Sounds/heartychuckle.ogg" id="5_b32re"]
[ext_resource type="AudioStream" uid="uid://0mhkf1ls1wcn" path="res://Sounds/sadsound.ogg" id="6_qe4bi"]
[ext_resource type="AudioStream" uid="uid://bmocmgq06o6f5" path="res://Sounds/footstep.ogg" id="7_b2ik0"]
[sub_resource type="AnimationNodeAdd2" id="AnimationNodeAdd2_a0vxm"]
filters = ["rig/Skeleton3D:forearm.L", "rig/Skeleton3D:forearm.R", "rig/Skeleton3D:head", "rig/Skeleton3D:upper_arm.L", "rig/Skeleton3D:upper_arm.R"]
@ -155,7 +154,7 @@ transform = Transform3D(0.065, 0, 0, 0, 0.065, 0, 0, 0, 0.065, 0, 0, 0)
script = ExtResource("2_ksje8")
[node name="Skeleton3D" parent="rig" index="0"]
bones/0/rotation = Quaternion(0.0733902, 0, 0, 0.997303)
bones/0/rotation = Quaternion(0.0684942, 0, 0, 0.997652)
bones/1/rotation = Quaternion(-0.0891896, 1.18734e-07, -1.06322e-08, 0.996015)
bones/2/rotation = Quaternion(0.0133933, -1.19199e-07, 1.5966e-09, 0.99991)
bones/3/rotation = Quaternion(-0.00997737, 0.100365, -0.694951, 0.711948)
@ -170,7 +169,6 @@ bones/15/rotation = Quaternion(0.105246, -0.0039338, 0.0113526, 0.994374)
[node name="OmniLight3D" type="OmniLight3D" parent="." index="2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.289473, 8.26292, 4.26359)
light_energy = 0.5
[node name="AnimationTree" type="AnimationTree" parent="." index="3"]
tree_root = SubResource("AnimationNodeStateMachine_6mfdu")
@ -193,9 +191,5 @@ stream = ExtResource("5_b32re")
[node name="sad" type="AudioStreamPlayer" parent="." index="7"]
stream = ExtResource("6_qe4bi")
[node name="soundboard" type="AudioStreamPlayer" parent="." index="8"]
[node name="woohoo" type="AudioStreamPlayer" parent="." index="8"]
stream = ExtResource("6_qe4bi")
[node name="footstep" type="AudioStreamPlayer" parent="." index="9"]
stream = ExtResource("7_b2ik0")
volume_db = -10.0

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)
[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
[node name="Holster" type="Node3D" parent="."]

30
godot/spawner.gd Normal file
View File

@ -0,0 +1,30 @@
extends Node3D
var rng = RandomNumberGenerator.new()
var spawnableItems: Array
# Called when the node enters the scene tree for the first time.
func _ready():
$SpawnTimer.wait_time = 10
$SpawnTimer.one_shot = true
spawnableItems.append(load("res://cultist.tscn"))
spawnableItems.append(load("res://villager_shared.tscn"))
$SpawnTimer.start()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_spawn_timer_timeout():
var item_to_spawn = rng.randi_range(0, spawnableItems.size() - 1)
var spawned_item = spawnableItems[item_to_spawn].instantiate()
get_parent_node_3d().add_child(spawned_item)
spawned_item.set_global_position(global_transform.origin)
spawned_item.set_velocity(Vector3(rng.randf_range(0, 3), rng.randf_range(1, 3), rng.randf_range(0, 3)))
# Start the timer again at a random rate.
$SpawnTimer.wait_time = rng.randi_range(120, 300)
$SpawnTimer.start()

10
godot/spawner.tscn Normal file
View File

@ -0,0 +1,10 @@
[gd_scene load_steps=2 format=3 uid="uid://d0uw7ykhb1cx8"]
[ext_resource type="Script" path="res://spawner.gd" id="1_xameb"]
[node name="Spawner" type="Node3D"]
script = ExtResource("1_xameb")
[node name="SpawnTimer" type="Timer" parent="."]
[connection signal="timeout" from="SpawnTimer" to="." method="_on_spawn_timer_timeout"]