diff --git a/godot/Level/Island.tscn b/godot/Level/Island.tscn index 9f48542..0f3c94a 100644 --- a/godot/Level/Island.tscn +++ b/godot/Level/Island.tscn @@ -22,13 +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" 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://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" uid="uid://bw3k2c75qavce" path="res://Models/beach_decor/bucket.tscn" id="27_f3p1i"] -[ext_resource type="PackedScene" path="res://Level/World/DayNightEnvironment.tscn" id="27_jutn4"] +[ext_resource type="PackedScene" uid="uid://6ycop5t3nra5" 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" path="res://crate.tscn" id="28_x0lrj"] -[ext_resource type="PackedScene" uid="uid://d0uw7ykhb1cx8" path="res://spawner.tscn" id="29_etvc6"] +[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"] [sub_resource type="Animation" id="Animation_jpnyu"] resource_name = "waves" diff --git a/godot/Level/World/DayNightEnvironment.gd b/godot/Level/World/DayNightEnvironment.gd new file mode 100644 index 0000000..95ace35 --- /dev/null +++ b/godot/Level/World/DayNightEnvironment.gd @@ -0,0 +1,16 @@ +extends Node3D + +var we = [ + preload("res://Level/World/world_environment.tscn"), + preload("res://Level/World/world_environment2.tscn"), +] +var current = null + +func _ready(): + randomize_env() + +func randomize_env(): + if current: + current.queue_free() + current = we[randi() % we.size()].instantiate() + add_child(current) diff --git a/godot/Level/World/DayNightEnvironment.tscn b/godot/Level/World/DayNightEnvironment.tscn index 527f3b9..9c549af 100644 --- a/godot/Level/World/DayNightEnvironment.tscn +++ b/godot/Level/World/DayNightEnvironment.tscn @@ -1,23 +1,6 @@ -[gd_scene load_steps=8 format=3 uid="uid://6ycop5t3nra5"] +[gd_scene load_steps=4 format=3 uid="uid://6ycop5t3nra5"] -[sub_resource type="Gradient" id="Gradient_6ntap"] -colors = PackedColorArray(0, 0.447059, 0.603922, 1, 0, 0, 0, 1) - -[sub_resource type="GradientTexture2D" id="GradientTexture2D_bagcs"] -gradient = SubResource("Gradient_6ntap") -fill_from = Vector2(1, 0.525641) - -[sub_resource type="PhysicalSkyMaterial" id="PhysicalSkyMaterial_es06v"] -night_sky = SubResource("GradientTexture2D_bagcs") - -[sub_resource type="Sky" id="Sky_qcavb"] -sky_material = SubResource("PhysicalSkyMaterial_es06v") - -[sub_resource type="Environment" id="Environment_d42bf"] -background_mode = 2 -background_energy_multiplier = 0.5 -sky = SubResource("Sky_qcavb") -sky_rotation = Vector3(6.28319, 0, 0) +[ext_resource type="Script" path="res://Level/World/DayNightEnvironment.gd" id="1_82go6"] [sub_resource type="Animation" id="Animation_l6y5u"] resource_name = "DayNightCycle" @@ -42,9 +25,7 @@ _data = { } [node name="DayNightEnvironment" type="Node3D"] - -[node name="WorldEnvironment" type="WorldEnvironment" parent="."] -environment = SubResource("Environment_d42bf") +script = ExtResource("1_82go6") [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] light_energy = 0.75 @@ -54,3 +35,9 @@ autoplay = "DayNightCycle" libraries = { "": SubResource("AnimationLibrary_2t5g8") } + +[node name="ChangeWorldEnvTimer" type="Timer" parent="."] +wait_time = 60.0 +autostart = true + +[connection signal="timeout" from="ChangeWorldEnvTimer" to="." method="randomize_env"] diff --git a/godot/Level/World/world_environment2.tscn b/godot/Level/World/world_environment2.tscn new file mode 100644 index 0000000..755fc4f --- /dev/null +++ b/godot/Level/World/world_environment2.tscn @@ -0,0 +1,23 @@ +[gd_scene load_steps=6 format=3 uid="uid://b7il746jn24fx"] + +[sub_resource type="Gradient" id="Gradient_6ntap"] +colors = PackedColorArray(0, 0.447059, 0.603922, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_bagcs"] +gradient = SubResource("Gradient_6ntap") +fill_from = Vector2(1, 0.525641) + +[sub_resource type="PhysicalSkyMaterial" id="PhysicalSkyMaterial_es06v"] +night_sky = SubResource("GradientTexture2D_bagcs") + +[sub_resource type="Sky" id="Sky_qcavb"] +sky_material = SubResource("PhysicalSkyMaterial_es06v") + +[sub_resource type="Environment" id="Environment_d42bf"] +background_mode = 2 +background_energy_multiplier = 0.5 +sky = SubResource("Sky_qcavb") +sky_rotation = Vector3(6.28319, 0, 0) + +[node name="WorldEnvironment" type="WorldEnvironment"] +environment = SubResource("Environment_d42bf") diff --git a/godot/Models/grape_man.tscn b/godot/Models/grape_man.tscn index 017e66a..759ad10 100644 --- a/godot/Models/grape_man.tscn +++ b/godot/Models/grape_man.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=41 format=3 uid="uid://bgoo1lbt28na"] +[gd_scene load_steps=42 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,6 +6,7 @@ [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"] @@ -154,7 +155,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.0684942, 0, 0, 0.997652) +bones/0/rotation = Quaternion(0.0733902, 0, 0, 0.997303) 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) @@ -169,6 +170,7 @@ 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") @@ -191,5 +193,9 @@ stream = ExtResource("5_b32re") [node name="sad" type="AudioStreamPlayer" parent="." index="7"] stream = ExtResource("6_qe4bi") -[node name="woohoo" type="AudioStreamPlayer" parent="." index="8"] +[node name="soundboard" 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 diff --git a/godot/player.tscn b/godot/player.tscn index cff76ff..576fad1 100644 --- a/godot/player.tscn +++ b/godot/player.tscn @@ -25,7 +25,8 @@ 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.643936) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.930216) +current = true fov = 50.0 [node name="Holster" type="Node3D" parent="."]