This commit is contained in:
Spencer Killen 2023-08-20 16:49:08 -06:00
parent 9712819295
commit 0a95e545ce
Signed by: sjkillen
GPG Key ID: F307025B65C860BA
4 changed files with 50 additions and 22 deletions

View File

@ -491,6 +491,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")] [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) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.31447, 2.55588, -2.13044)
[node name="Timer" type="Timer" parent="."]
[connection signal="finished" from="Music" to="Music" method="_on_finished"] [connection signal="finished" from="Music" to="Music" method="_on_finished"]
[connection signal="timeout" from="Music/Transition" to="Music" method="_on_transition_timer_timeout"] [connection signal="timeout" from="Music/Transition" to="Music" method="_on_transition_timer_timeout"]
[connection signal="timeout" from="Music/Tween" to="Music" method="_on_tween_timer_timeout"] [connection signal="timeout" from="Music/Tween" to="Music" method="_on_tween_timer_timeout"]

View File

@ -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)

View File

@ -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"] [ext_resource type="Script" path="res://Level/World/DayNightEnvironment.gd" id="1_82go6"]
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)
[sub_resource type="Animation" id="Animation_l6y5u"] [sub_resource type="Animation" id="Animation_l6y5u"]
resource_name = "DayNightCycle" resource_name = "DayNightCycle"
@ -42,9 +25,7 @@ _data = {
} }
[node name="DayNightEnvironment" type="Node3D"] [node name="DayNightEnvironment" type="Node3D"]
script = ExtResource("1_82go6")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_d42bf")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
light_energy = 0.75 light_energy = 0.75
@ -54,3 +35,9 @@ autoplay = "DayNightCycle"
libraries = { libraries = {
"": SubResource("AnimationLibrary_2t5g8") "": SubResource("AnimationLibrary_2t5g8")
} }
[node name="ChangeWorldEnvTimer" type="Timer" parent="."]
wait_time = 60.0
autostart = true
[connection signal="timeout" from="ChangeWorldEnvTimer" to="." method="randomize_env"]

View File

@ -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")