polish9
Co-authored-by: m.sonaglioni <m.sonaglioni@jmpgames.it> Co-committed-by: m.sonaglioni <m.sonaglioni@jmpgames.it>
This commit was merged in pull request #39.
This commit is contained in:
@@ -5,6 +5,28 @@
|
||||
[ext_resource type="PackedScene" uid="uid://4y4tffc723lg" path="res://core/ai/agents/fox/Fox_rig.fbx" id="2_xaafp"]
|
||||
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/framework/patrol_state.gd" id="3_d1sp2"]
|
||||
[ext_resource type="Script" uid="uid://b5y4u0itec8g1" path="res://core/ai/framework/run_state.gd" id="4_d1sp2"]
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="6_oqxvo"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_4pdxi"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("6_oqxvo")
|
||||
shader_parameter/albedo_color = Color(0.5408599, 0.27705142, 0.12841594, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(3, 3)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 1.5
|
||||
shader_parameter/light_steps = 3.0
|
||||
shader_parameter/step_softness = 0.1
|
||||
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
|
||||
shader_parameter/shadow_offset = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/use_ghibli_glint = true
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 1.0
|
||||
shader_parameter/glint_sharpness = 32.0
|
||||
shader_parameter/emission_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/emission_energy = 0.0
|
||||
|
||||
[node name="AiFox" unique_id=1228675528 node_paths=PackedStringArray("anim_player") instance=ExtResource("1_m3efo")]
|
||||
navigation_layers = 4
|
||||
@@ -61,4 +83,7 @@ bones/26/rotation = Quaternion(-3.3980676e-05, -0.00016874354, 0.9618461, -0.273
|
||||
bones/27/rotation = Quaternion(-1.9324155e-08, 4.5031282e-08, -0.47071794, 0.8822838)
|
||||
bones/28/rotation = Quaternion(4.549153e-05, -8.8271285e-05, 0.5290293, 0.84860367)
|
||||
|
||||
[node name="fox" parent="Fox_rig/Rig_Fox/Skeleton3D" index="0" unique_id=2042924802]
|
||||
surface_material_override/1 = SubResource("ShaderMaterial_4pdxi")
|
||||
|
||||
[editable path="Fox_rig"]
|
||||
|
||||
@@ -4,6 +4,50 @@
|
||||
[ext_resource type="PackedScene" uid="uid://cumnmnbdjbgas" path="res://core/ai/agents/goat/Goat_rig.fbx" id="2_oxwbf"]
|
||||
[ext_resource type="Script" uid="uid://d3hy70ec8vqo5" path="res://core/ai/framework/run_animation_state.gd" id="2_ucoix"]
|
||||
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/framework/patrol_state.gd" id="3_lqqd8"]
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="5_lqqd8"]
|
||||
[ext_resource type="Material" uid="uid://cn20mp8ep3yxu" path="res://tgcc/chunk/material/wires.tres" id="6_xcxu7"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_xcxu7"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("5_lqqd8")
|
||||
shader_parameter/albedo_color = Color(0.46774077, 0.51844496, 0.510305, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(3, 3)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 1.5
|
||||
shader_parameter/light_steps = 3.0
|
||||
shader_parameter/step_softness = 0.1
|
||||
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
|
||||
shader_parameter/shadow_offset = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/use_ghibli_glint = true
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 1.0
|
||||
shader_parameter/glint_sharpness = 32.0
|
||||
shader_parameter/emission_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/emission_energy = 0.0
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lqqd8"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("5_lqqd8")
|
||||
shader_parameter/albedo_color = Color(0.49370736, 0.43829006, 0.29924837, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(3, 3)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 1.5
|
||||
shader_parameter/light_steps = 3.0
|
||||
shader_parameter/step_softness = 0.1
|
||||
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
|
||||
shader_parameter/shadow_offset = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/use_ghibli_glint = true
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 1.0
|
||||
shader_parameter/glint_sharpness = 32.0
|
||||
shader_parameter/emission_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/emission_energy = 0.0
|
||||
|
||||
[node name="AiGoat" unique_id=1228675528 node_paths=PackedStringArray("anim_player") instance=ExtResource("1_f7hhh")]
|
||||
anim_player = NodePath("Goat_rig/AnimationPlayer")
|
||||
@@ -28,7 +72,7 @@ exit_on_action_finished = true
|
||||
|
||||
[node name="Goat_rig" parent="." index="3" unique_id=1336829719 instance=ExtResource("2_oxwbf")]
|
||||
|
||||
[node name="Skeleton3D" parent="Goat_rig/Rig_Goat" parent_id_path=PackedInt32Array(1336829719, 123281310) index="0" unique_id=1526518923]
|
||||
[node name="Skeleton3D" parent="Goat_rig/Rig_Goat" parent_id_path=PackedInt32Array(1336829719, 1679574624) index="0" unique_id=1406072579]
|
||||
bones/1/position = Vector3(-8.352713e-09, 0.36986786, 0.8951362)
|
||||
bones/1/rotation = Quaternion(0.1276911, -0.695482, -0.12769035, 0.69548184)
|
||||
bones/2/rotation = Quaternion(-8.7811394e-08, -9.458198e-08, -0.5904155, 0.80709946)
|
||||
@@ -51,4 +95,10 @@ bones/26/rotation = Quaternion(2.713829e-07, 8.5825764e-07, 0.9653876, -0.260819
|
||||
bones/27/rotation = Quaternion(-3.8362674e-07, 5.6200027e-09, -0.3680436, 0.92980856)
|
||||
bones/28/rotation = Quaternion(-0.00015313082, -7.842175e-05, 0.45790914, 0.888999)
|
||||
|
||||
[node name="Goat" parent="Goat_rig/Rig_Goat/Skeleton3D" index="0" unique_id=1545212389]
|
||||
surface_material_override/0 = SubResource("ShaderMaterial_xcxu7")
|
||||
surface_material_override/1 = SubResource("ShaderMaterial_lqqd8")
|
||||
surface_material_override/2 = ExtResource("6_xcxu7")
|
||||
surface_material_override/3 = ExtResource("6_xcxu7")
|
||||
|
||||
[editable path="Goat_rig"]
|
||||
|
||||
Binary file not shown.
@@ -3,6 +3,31 @@
|
||||
[ext_resource type="PackedScene" uid="uid://mvh2v6v72stt" path="res://core/ai/agents/human/ai_human.tscn" id="1_l2y7m"]
|
||||
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/framework/patrol_state.gd" id="3_2oda6"]
|
||||
[ext_resource type="Script" uid="uid://d3hy70ec8vqo5" path="res://core/ai/framework/run_animation_state.gd" id="4_2oda6"]
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="6_ejkex"]
|
||||
[ext_resource type="Texture2D" uid="uid://jn4seoee6vtw" path="res://tgcc/chunk/prop/house/main_texture.png" id="7_ax7ee"]
|
||||
[ext_resource type="Material" uid="uid://b2lg2y1k7grmo" path="res://tgcc/chunk/prop/tree/trunk.tres" id="9_gownw"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_gownw"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("6_ejkex")
|
||||
shader_parameter/albedo_color = Color(1, 1, 1, 1)
|
||||
shader_parameter/albedo_texture = ExtResource("7_ax7ee")
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
shader_parameter/light_steps = 3.0
|
||||
shader_parameter/step_softness = 0.1
|
||||
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
|
||||
shader_parameter/shadow_offset = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/use_ghibli_glint = true
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 0.446000021185
|
||||
shader_parameter/glint_sharpness = 7.000000285
|
||||
shader_parameter/emission_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/emission_energy = 0.0
|
||||
|
||||
[node name="AiFarmer" unique_id=1228675528 instance=ExtResource("1_l2y7m")]
|
||||
navigation_layers = 2
|
||||
@@ -71,4 +96,27 @@ bones/53/rotation = Quaternion(-0.25056988, -0.06629382, 0.018621337, 0.96564656
|
||||
bones/54/rotation = Quaternion(0.549743, -0.041815143, -0.046032935, 0.83301574)
|
||||
bones/55/rotation = Quaternion(0.3627838, -0.05369254, 0.01255593, 0.9302406)
|
||||
|
||||
[node name="hat_001" parent="Farmer1/BaseMesh/Skeleton3D" parent_id_path=PackedInt32Array(925374995, 224377346) index="1" unique_id=1950307793]
|
||||
surface_material_override/0 = SubResource("ShaderMaterial_gownw")
|
||||
|
||||
[node name="pants" parent="Farmer1/BaseMesh/Skeleton3D" parent_id_path=PackedInt32Array(925374995, 224377346) index="2" unique_id=1080342530]
|
||||
surface_material_override/0 = ExtResource("9_gownw")
|
||||
|
||||
[node name="shirt2" parent="Farmer1/BaseMesh/Skeleton3D" parent_id_path=PackedInt32Array(925374995, 224377346) index="3" unique_id=1846653994]
|
||||
surface_material_override/0 = ExtResource("9_gownw")
|
||||
surface_material_override/1 = ExtResource("9_gownw")
|
||||
surface_material_override/2 = ExtResource("9_gownw")
|
||||
|
||||
[node name="pants" parent="Farmer2/BaseMesh/Skeleton3D" parent_id_path=PackedInt32Array(1239853450, 1824387143) index="1" unique_id=1777820543]
|
||||
surface_material_override/0 = ExtResource("9_gownw")
|
||||
|
||||
[node name="shirt1" parent="Farmer2/BaseMesh/Skeleton3D" parent_id_path=PackedInt32Array(1239853450, 1824387143) index="2" unique_id=1243989703]
|
||||
surface_material_override/0 = ExtResource("9_gownw")
|
||||
surface_material_override/1 = ExtResource("9_gownw")
|
||||
|
||||
[node name="DressHuman" parent="." index="6" unique_id=107727715]
|
||||
colors = Array[Color]([Color(0.8, 0.45490196, 0.32156864, 1), Color(0.84797, 0.6868576, 0.24382448, 1), Color(0.4862745, 0.60784316, 0.6901961, 1), Color(0.24718326, 0.3552445, 0.23638204, 1), Color(0.34000763, 0.32978323, 0.29223797, 1)])
|
||||
|
||||
[editable path="BaseMesh"]
|
||||
[editable path="Farmer1"]
|
||||
[editable path="Farmer2"]
|
||||
|
||||
@@ -7,8 +7,13 @@
|
||||
[ext_resource type="Animation" uid="uid://oq22ilhxjejj" path="res://core/ai/agents/human/idle.res" id="4_cuxdk"]
|
||||
[ext_resource type="Animation" uid="uid://6xnsf8x7nmsl" path="res://core/ai/agents/human/walking.res" id="6_cuxdk"]
|
||||
[ext_resource type="PackedScene" uid="uid://b3j2dbcqwodx1" path="res://core/ai/agents/human/Farmer1.fbx" id="7_hguxe"]
|
||||
[ext_resource type="Material" uid="uid://blqelpjvdv23j" path="res://tgcc/chunk/material/grassflat_chunk.tres" id="8_362f3"]
|
||||
[ext_resource type="PackedScene" uid="uid://c5x3ycaxixpxy" path="res://core/ai/agents/human/Farmer2.fbx" id="8_ke7sb"]
|
||||
[ext_resource type="Script" uid="uid://dauqq8cqmwrqh" path="res://core/ai/agents/human/dress_human.gd" id="9_2tpdi"]
|
||||
[ext_resource type="Material" uid="uid://b4luvp3fi0p43" path="res://tgcc/chunk/material/railway_chunk.tres" id="9_12auf"]
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="10_3t1a4"]
|
||||
[ext_resource type="Texture2D" uid="uid://jn4seoee6vtw" path="res://tgcc/chunk/prop/house/main_texture.png" id="11_o6vi4"]
|
||||
[ext_resource type="Material" uid="uid://wkegx4a21x7u" path="res://tgcc/chunk/prop/fence/fences.tres" id="11_v2pkc"]
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_8kg0q"]
|
||||
_data = {
|
||||
@@ -18,6 +23,28 @@ _data = {
|
||||
&"walking": ExtResource("6_cuxdk")
|
||||
}
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_vuqrb"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("10_3t1a4")
|
||||
shader_parameter/albedo_color = Color(1, 1, 1, 1)
|
||||
shader_parameter/albedo_texture = ExtResource("11_o6vi4")
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
shader_parameter/light_steps = 3.0
|
||||
shader_parameter/step_softness = 0.1
|
||||
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
|
||||
shader_parameter/shadow_offset = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/use_ghibli_glint = false
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 2.000000095
|
||||
shader_parameter/glint_sharpness = 7.000000285
|
||||
shader_parameter/emission_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/emission_energy = 0.0
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ke7sb"]
|
||||
_data = {
|
||||
&"gathering": ExtResource("3_8kg0q"),
|
||||
@@ -26,6 +53,28 @@ _data = {
|
||||
&"walking": ExtResource("6_cuxdk")
|
||||
}
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_v2pkc"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("10_3t1a4")
|
||||
shader_parameter/albedo_color = Color(1, 1, 1, 1)
|
||||
shader_parameter/albedo_texture = ExtResource("11_o6vi4")
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
shader_parameter/light_steps = 3.0
|
||||
shader_parameter/step_softness = 0.1
|
||||
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
|
||||
shader_parameter/shadow_offset = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/use_ghibli_glint = false
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 2.000000095
|
||||
shader_parameter/glint_sharpness = 7.000000285
|
||||
shader_parameter/emission_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/emission_energy = 0.0
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_2tpdi"]
|
||||
_data = {
|
||||
&"gathering": ExtResource("3_8kg0q"),
|
||||
@@ -40,7 +89,7 @@ anim_player = NodePath("BaseMesh/AnimationPlayer")
|
||||
[node name="BaseMesh" parent="." index="3" unique_id=1846171523 instance=ExtResource("3_ef4cu")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.9, 0)
|
||||
|
||||
[node name="Skeleton3D" parent="BaseMesh/BaseMesh" parent_id_path=PackedInt32Array(1846171523, 2032005240) index="0" unique_id=1876883359]
|
||||
[node name="Skeleton3D" parent="BaseMesh/BaseMesh" parent_id_path=PackedInt32Array(1846171523, 1363988051) index="0" unique_id=1848874512]
|
||||
bones/0/position = Vector3(-0.0024333135, 0.9952637, 6.9276895e-05)
|
||||
bones/0/rotation = Quaternion(-0.0049152793, -0.050206795, -0.026513178, 0.99837476)
|
||||
bones/1/rotation = Quaternion(-0.025209453, 0.006135946, 0.009180705, 0.9996213)
|
||||
@@ -83,14 +132,14 @@ bones/53/rotation = Quaternion(-0.10502596, -0.00032293255, 0.008123855, 0.99443
|
||||
bones/54/rotation = Quaternion(0.51151097, 0.066536464, -0.07767137, 0.8531686)
|
||||
bones/55/rotation = Quaternion(0.3453064, -0.067497015, 0.02391528, 0.93575406)
|
||||
|
||||
[node name="AnimationPlayer" parent="BaseMesh" index="1" unique_id=226905852]
|
||||
[node name="AnimationPlayer" parent="BaseMesh" index="1" unique_id=930749540]
|
||||
libraries/custom = SubResource("AnimationLibrary_8kg0q")
|
||||
|
||||
[node name="Farmer1" parent="." index="4" unique_id=925374995 instance=ExtResource("7_hguxe")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.9, 0)
|
||||
visible = false
|
||||
|
||||
[node name="Skeleton3D" parent="Farmer1/BaseMesh" parent_id_path=PackedInt32Array(925374995, 35893719) index="0" unique_id=264693097]
|
||||
[node name="Skeleton3D" parent="Farmer1/BaseMesh" parent_id_path=PackedInt32Array(925374995, 1608049295) index="0" unique_id=224377346]
|
||||
bones/0/position = Vector3(0.00060560287, 0.9719096, 0.007789615)
|
||||
bones/0/rotation = Quaternion(-0.03158553, -0.024531638, -0.086598895, 0.9954402)
|
||||
bones/1/rotation = Quaternion(-0.068302006, -0.011589706, 0.088431515, 0.99367017)
|
||||
@@ -133,14 +182,31 @@ bones/53/rotation = Quaternion(-0.20515193, 0.049833227, 0.0071537, 0.9774345)
|
||||
bones/54/rotation = Quaternion(0.55275166, -0.049315806, -0.007871797, 0.8318483)
|
||||
bones/55/rotation = Quaternion(0.326561, -0.058840513, 0.019667907, 0.9431378)
|
||||
|
||||
[node name="AnimationPlayer" parent="Farmer1" index="1" unique_id=1795570086]
|
||||
[node name="Cesto" parent="Farmer1/BaseMesh/Skeleton3D" index="0" unique_id=1473592366]
|
||||
surface_material_override/0 = ExtResource("8_362f3")
|
||||
surface_material_override/1 = ExtResource("9_12auf")
|
||||
surface_material_override/2 = ExtResource("9_12auf")
|
||||
|
||||
[node name="hat_001" parent="Farmer1/BaseMesh/Skeleton3D" index="1" unique_id=1950307793]
|
||||
surface_material_override/0 = SubResource("ShaderMaterial_vuqrb")
|
||||
surface_material_override/1 = ExtResource("11_v2pkc")
|
||||
|
||||
[node name="pants" parent="Farmer1/BaseMesh/Skeleton3D" index="2" unique_id=1080342530]
|
||||
surface_material_override/0 = ExtResource("11_v2pkc")
|
||||
|
||||
[node name="shirt2" parent="Farmer1/BaseMesh/Skeleton3D" index="3" unique_id=1846653994]
|
||||
surface_material_override/0 = ExtResource("11_v2pkc")
|
||||
surface_material_override/1 = ExtResource("11_v2pkc")
|
||||
surface_material_override/2 = ExtResource("11_v2pkc")
|
||||
|
||||
[node name="AnimationPlayer" parent="Farmer1" index="1" unique_id=2137081705]
|
||||
libraries/custom = SubResource("AnimationLibrary_ke7sb")
|
||||
|
||||
[node name="Farmer2" parent="." index="5" unique_id=1239853450 instance=ExtResource("8_ke7sb")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.9, 0)
|
||||
visible = false
|
||||
|
||||
[node name="Skeleton3D" parent="Farmer2/BaseMesh" parent_id_path=PackedInt32Array(1239853450, 2123768022) index="0" unique_id=1560566445]
|
||||
[node name="Skeleton3D" parent="Farmer2/BaseMesh" parent_id_path=PackedInt32Array(1239853450, 2068119799) index="0" unique_id=1824387143]
|
||||
bones/0/position = Vector3(0.00060560287, 0.9719096, 0.007789615)
|
||||
bones/0/rotation = Quaternion(-0.03158553, -0.024531638, -0.086598895, 0.9954402)
|
||||
bones/1/rotation = Quaternion(-0.068302006, -0.011589706, 0.088431515, 0.99367017)
|
||||
@@ -183,13 +249,24 @@ bones/53/rotation = Quaternion(-0.20515193, 0.049833227, 0.0071537, 0.9774345)
|
||||
bones/54/rotation = Quaternion(0.55275166, -0.049315806, -0.007871797, 0.8318483)
|
||||
bones/55/rotation = Quaternion(0.326561, -0.058840513, 0.019667907, 0.9431378)
|
||||
|
||||
[node name="AnimationPlayer" parent="Farmer2" index="1" unique_id=916643412]
|
||||
[node name="hat_001" parent="Farmer2/BaseMesh/Skeleton3D" index="0" unique_id=1838787788]
|
||||
surface_material_override/0 = SubResource("ShaderMaterial_v2pkc")
|
||||
surface_material_override/1 = ExtResource("11_v2pkc")
|
||||
|
||||
[node name="pants" parent="Farmer2/BaseMesh/Skeleton3D" index="1" unique_id=1777820543]
|
||||
surface_material_override/0 = ExtResource("11_v2pkc")
|
||||
|
||||
[node name="shirt1" parent="Farmer2/BaseMesh/Skeleton3D" index="2" unique_id=1243989703]
|
||||
surface_material_override/0 = ExtResource("11_v2pkc")
|
||||
surface_material_override/1 = ExtResource("11_v2pkc")
|
||||
|
||||
[node name="AnimationPlayer" parent="Farmer2" index="1" unique_id=995025267]
|
||||
libraries/custom = SubResource("AnimationLibrary_2tpdi")
|
||||
|
||||
[node name="DressHuman" type="Node3D" parent="." index="6" unique_id=107727715 node_paths=PackedStringArray("farmers", "main_anim_player")]
|
||||
script = ExtResource("9_2tpdi")
|
||||
farmers = [NodePath("../Farmer1"), NodePath("../Farmer2")]
|
||||
colors = Array[Color]([Color(0, 0, 0, 1), Color(1, 1, 1, 1), Color(1, 0, 0, 1), Color(0, 1, 0, 1), Color(0, 0, 1, 1)])
|
||||
colors = Array[Color]([Color(0.4089676, 0.23789883, 0.083061926, 1), Color(0.4862745, 0.60784316, 0.6901961, 1), Color(0.3529412, 0.41960785, 0.32941177, 1), Color(0.31533447, 0.3330399, 0.29725653, 1)])
|
||||
main_anim_player = NodePath("../BaseMesh/AnimationPlayer")
|
||||
|
||||
[editable path="BaseMesh"]
|
||||
|
||||
@@ -4,6 +4,71 @@
|
||||
[ext_resource type="Script" uid="uid://d3hy70ec8vqo5" path="res://core/ai/framework/run_animation_state.gd" id="2_euyvm"]
|
||||
[ext_resource type="PackedScene" uid="uid://dg6eq5bjdv77x" path="res://core/ai/agents/wagyu/Wagyu_rig.fbx" id="2_kinfw"]
|
||||
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/framework/patrol_state.gd" id="3_stslt"]
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="5_stslt"]
|
||||
[ext_resource type="Material" uid="uid://cn20mp8ep3yxu" path="res://tgcc/chunk/material/wires.tres" id="7_qxgon"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_jndo6"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("5_stslt")
|
||||
shader_parameter/albedo_color = Color(0.3003036, 0.13408488, 0.037156556, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(3, 3)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 1.5
|
||||
shader_parameter/light_steps = 3.0
|
||||
shader_parameter/step_softness = 0.1
|
||||
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
|
||||
shader_parameter/shadow_offset = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/use_ghibli_glint = true
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 1.0
|
||||
shader_parameter/glint_sharpness = 32.0
|
||||
shader_parameter/emission_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/emission_energy = 0.0
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ffprj"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("5_stslt")
|
||||
shader_parameter/albedo_color = Color(0.8936267, 0.48305064, 0.25341055, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(3, 3)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 1.5
|
||||
shader_parameter/light_steps = 3.0
|
||||
shader_parameter/step_softness = 0.1
|
||||
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
|
||||
shader_parameter/shadow_offset = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/use_ghibli_glint = true
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 1.0
|
||||
shader_parameter/glint_sharpness = 32.0
|
||||
shader_parameter/emission_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/emission_energy = 0.0
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_4po7g"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("5_stslt")
|
||||
shader_parameter/albedo_color = Color(0.91262335, 0.6514041, 0.37075257, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(3, 3)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 1.5
|
||||
shader_parameter/light_steps = 3.0
|
||||
shader_parameter/step_softness = 0.1
|
||||
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
|
||||
shader_parameter/shadow_offset = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/use_ghibli_glint = true
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 1.0
|
||||
shader_parameter/glint_sharpness = 32.0
|
||||
shader_parameter/emission_color = Color(0, 0, 0, 1)
|
||||
shader_parameter/emission_energy = 0.0
|
||||
|
||||
[node name="AiWagyu" unique_id=1228675528 node_paths=PackedStringArray("anim_player") instance=ExtResource("1_01jto")]
|
||||
anim_player = NodePath("Wagyu_rig/AnimationPlayer")
|
||||
@@ -28,7 +93,7 @@ exit_on_action_finished = true
|
||||
|
||||
[node name="Wagyu_rig" parent="." index="3" unique_id=434062845 instance=ExtResource("2_kinfw")]
|
||||
|
||||
[node name="Skeleton3D" parent="Wagyu_rig/Rig_wagyu" parent_id_path=PackedInt32Array(434062845, 984050088) index="0" unique_id=1381831503]
|
||||
[node name="Skeleton3D" parent="Wagyu_rig/Rig_wagyu" parent_id_path=PackedInt32Array(434062845, 1389976890) index="0" unique_id=1274413548]
|
||||
bones/1/position = Vector3(3.0605813e-06, 0.93198204, 1.5827273)
|
||||
bones/1/rotation = Quaternion(0.12769, -0.69548225, -0.12769146, 0.6954816)
|
||||
bones/2/rotation = Quaternion(-7.474808e-08, -1.0355375e-07, -0.5904155, 0.80709946)
|
||||
@@ -51,4 +116,10 @@ bones/26/rotation = Quaternion(3.2779312e-07, 1.2327837e-06, 0.9652686, -0.26125
|
||||
bones/27/rotation = Quaternion(-6.191086e-07, -2.305114e-07, -0.36804327, 0.9298087)
|
||||
bones/28/rotation = Quaternion(-0.0001528551, -7.8230434e-05, 0.45790893, 0.8889991)
|
||||
|
||||
[node name="Wagyu" parent="Wagyu_rig/Rig_wagyu/Skeleton3D" index="0" unique_id=2005444162]
|
||||
surface_material_override/0 = SubResource("ShaderMaterial_jndo6")
|
||||
surface_material_override/1 = SubResource("ShaderMaterial_ffprj")
|
||||
surface_material_override/2 = ExtResource("7_qxgon")
|
||||
surface_material_override/3 = SubResource("ShaderMaterial_4po7g")
|
||||
|
||||
[editable path="Wagyu_rig"]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
shader_type spatial;
|
||||
render_mode blend_mix, depth_draw_opaque, cull_disabled;
|
||||
render_mode blend_mix, depth_draw_opaque, cull_disabled, shadows_disabled;
|
||||
|
||||
//Wire color
|
||||
uniform vec4 albedo_color : source_color = vec4(0.1, 0.1, 0.1, 1.0);
|
||||
|
||||
@@ -5,3 +5,4 @@
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_6saq1")
|
||||
shader_parameter/albedo_color = Color(0.1, 0.1, 0.1, 1)
|
||||
|
||||
@@ -20,13 +20,13 @@ render_priority = 0
|
||||
shader = ExtResource("1_qxph4")
|
||||
shader_parameter/noise_texture = SubResource("NoiseTexture2D_kavln")
|
||||
shader_parameter/ray_color = Color(1, 0.78431374, 0.27058825, 1)
|
||||
shader_parameter/base_alpha = 1.0
|
||||
shader_parameter/noise_stretching = 3.17200010317
|
||||
shader_parameter/base_alpha = 0.150000007125
|
||||
shader_parameter/noise_stretching = 3.000000095
|
||||
shader_parameter/noise_scale = 1.0
|
||||
shader_parameter/scrolling_speed = Vector2(0, 0.15)
|
||||
shader_parameter/depth_softness = 1.0
|
||||
shader_parameter/edge_fade_power = 2.0
|
||||
shader_parameter/intensity_multiplier = 0.5330000253175
|
||||
shader_parameter/intensity_multiplier = 0.50000002375
|
||||
|
||||
[node name="GodRay" type="Node3D" unique_id=1679441931]
|
||||
script = ExtResource("2_v3yr3")
|
||||
|
||||
@@ -68,36 +68,37 @@ alignment = 1
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
color = Color(0.7432059, 0.5684909, 1, 1)
|
||||
color = Color(0.72156864, 0.3529412, 0.32156864, 1)
|
||||
|
||||
[node name="ColorPicker2" parent="TextureRect/MarginContainer/HBoxContainer" unique_id=584054476 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
color = Color(0.47657922, 0.8792635, 0.8823829, 1)
|
||||
color = Color(0.83137256, 0.61960787, 0.3254902, 1)
|
||||
|
||||
[node name="ColorPicker3" parent="TextureRect/MarginContainer/HBoxContainer" unique_id=889429149 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
color = Color(0.54004896, 0.5516501, 0.45533067, 1)
|
||||
color = Color(0.35686275, 0.54901963, 0.5803922, 1)
|
||||
|
||||
[node name="ColorPicker4" parent="TextureRect/MarginContainer/HBoxContainer" unique_id=466686411 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
color = Color(0.40863404, 1, 0.47657922, 1)
|
||||
color = Color(0.43137255, 0.52156866, 0.40784314, 1)
|
||||
|
||||
[node name="ColorPicker5" parent="TextureRect/MarginContainer/HBoxContainer" unique_id=675841518 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
color = Color(1, 0, 0, 1)
|
||||
color = Color(0.5568628, 0.49803922, 0.65882355, 1)
|
||||
|
||||
[node name="ColorPicker6" parent="TextureRect/MarginContainer/HBoxContainer" unique_id=1698412911 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
color = Color(0.32156864, 0.43137255, 0.49019608, 1)
|
||||
|
||||
[node name="TextureRect2" type="TextureRect" parent="." unique_id=1180760395]
|
||||
layout_mode = 2
|
||||
@@ -123,13 +124,13 @@ alignment = 1
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
color = Color(0.7432059, 0.5684909, 1, 1)
|
||||
color = Color(0.92156863, 0.7529412, 0.40784314, 1)
|
||||
|
||||
[node name="ColorPicker8" parent="TextureRect2/MarginContainer/HBoxContainer2" unique_id=396324135 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
color = Color(0.47657922, 0.8792635, 0.8823829, 1)
|
||||
color = Color(0.9529412, 0.91764706, 0.827451, 1)
|
||||
|
||||
[node name="ColorPicker9" parent="TextureRect2/MarginContainer/HBoxContainer2" unique_id=1233950004 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
@@ -141,19 +142,20 @@ color = Color(0.54004896, 0.5516501, 0.45533067, 1)
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
color = Color(0.40863404, 1, 0.47657922, 1)
|
||||
color = Color(0.33591065, 0.42461705, 0.38732395, 1)
|
||||
|
||||
[node name="ColorPicker11" parent="TextureRect2/MarginContainer/HBoxContainer2" unique_id=831493295 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
color = Color(1, 0, 0, 1)
|
||||
color = Color(0.44940293, 0.7807106, 0.89803255, 1)
|
||||
|
||||
[node name="ColorPicker12" parent="TextureRect2/MarginContainer/HBoxContainer2" unique_id=170636843 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
color = Color(0.9098039, 0.6, 0.5529412, 1)
|
||||
|
||||
[node name="ContainerTween" parent="." unique_id=160227524 node_paths=PackedStringArray("targets") instance=ExtResource("10_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
targets = [NodePath(""), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker1"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker2"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker3"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker4"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker5"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker6"), NodePath("")]
|
||||
targets = [null, NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker1"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker2"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker3"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker4"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker5"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker6"), null]
|
||||
|
||||
@@ -1,57 +1,109 @@
|
||||
extends CanvasLayer
|
||||
|
||||
@export var config: SceneConfig
|
||||
|
||||
@export_group("Transition Timings")
|
||||
@export var fade_in_duration: float = 0.5
|
||||
@export var black_screen_duration: float = 1.0
|
||||
@export var fade_out_duration: float = 0.5
|
||||
@export var logo_fade_in_duration: float = 0.3
|
||||
@export var logo_fade_out_duration: float = 0.3
|
||||
|
||||
@export_group("Cozy Animation")
|
||||
@export var sway_speed: float = 2.5 # Velocità dell'oscillazione (più alto = più veloce)
|
||||
@export var max_sway_angle: float = 6.0 # Gradi massimi di inclinazione a destra/sinistra
|
||||
@export var pulse_speed: float = 2.0 # Velocità del "respiro"
|
||||
@export var pulse_amount: float = 0.015 # Quanto si ingrandisce/rimpicciolisce il logo
|
||||
|
||||
@export_group("Shader Parameters")
|
||||
@export var base_color: Color = Color.BLACK
|
||||
@export var shape_tiling: float = 16.0
|
||||
@export var shape_rotation: float = 0.0
|
||||
@export var shape_scroll: Vector2 = Vector2.ZERO
|
||||
@export var shape_feathering: float = 0.05
|
||||
@export var shape_treshold: float = 1.0
|
||||
@export var width: float = 0.5
|
||||
|
||||
@onready var color_rect = $ColorRect
|
||||
@onready var loading_screen = $LoadingScreen
|
||||
@export var transition_duration: float = 3
|
||||
@onready var logo = $LoadingScreen/Logo
|
||||
|
||||
const SHADER_PATH := "res://core/transition.gdshader"
|
||||
var transaction_material: ShaderMaterial
|
||||
|
||||
var time_passed: float = 0.0
|
||||
var initial_scale: Vector2 = Vector2.ONE
|
||||
var scale_captured: bool = false
|
||||
|
||||
func _ready() -> void:
|
||||
_build_material()
|
||||
_update_resolution()
|
||||
get_viewport().size_changed.connect(_update_resolution)
|
||||
_set_factor(0.0)
|
||||
|
||||
color_rect.z_index = 0
|
||||
loading_screen.z_index = 1
|
||||
|
||||
color_rect.visible = false
|
||||
loading_screen.visible = false
|
||||
loading_screen.modulate.a = 0.0
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if loading_screen.visible and logo and logo.visible:
|
||||
# Cattura la scala originale (0.22) impostata nell'editor alla prima attivazione
|
||||
if not scale_captured:
|
||||
initial_scale = logo.scale
|
||||
scale_captured = true
|
||||
|
||||
time_passed += delta
|
||||
|
||||
# 1. EFFETTO DONDOLIO (Usa il seno per oscillare morbidamente)
|
||||
var target_rotation = sin(time_passed * sway_speed) * deg_to_rad(max_sway_angle)
|
||||
logo.rotation = target_rotation
|
||||
|
||||
# 2. EFFETTO RESPIRO (Modifica leggermente lo scale partendo da quello base)
|
||||
var pulse = sin(time_passed * pulse_speed) * pulse_amount
|
||||
logo.scale = initial_scale + Vector2(pulse, pulse)
|
||||
else:
|
||||
# Reset del timer quando la schermata si chiude per ripartire da zero la prossima volta
|
||||
time_passed = 0.0
|
||||
|
||||
func _build_material() -> void:
|
||||
transaction_material = ShaderMaterial.new()
|
||||
transaction_material.shader = load(SHADER_PATH)
|
||||
|
||||
#directional gradient: bottom-left-> black; top-right -> white
|
||||
var g := Gradient.new()
|
||||
g.set_color(0, Color.BLACK)
|
||||
g.set_color(1, Color.WHITE)
|
||||
var grad_tex := GradientTexture2D.new()
|
||||
grad_tex.gradient = g
|
||||
grad_tex.fill = GradientTexture2D.FILL_LINEAR
|
||||
grad_tex.fill_from = Vector2(0.0, 1.0) # bottom-left
|
||||
grad_tex.fill_to = Vector2(1.0, 0.0) # top-right
|
||||
grad_tex.fill_from = Vector2(0.0, 1.0)
|
||||
grad_tex.fill_to = Vector2(1.0, 0.0)
|
||||
grad_tex.width = 256
|
||||
grad_tex.height = 256
|
||||
|
||||
#shape: sphere (white at the center, black around)
|
||||
var sg := Gradient.new()
|
||||
sg.set_color(0, Color.WHITE)
|
||||
sg.set_color(1, Color.BLACK)
|
||||
var shape_tex := GradientTexture2D.new()
|
||||
shape_tex.gradient = sg
|
||||
shape_tex.fill = GradientTexture2D.FILL_RADIAL
|
||||
shape_tex.fill_from = Vector2(0.5, 0.5) # center
|
||||
shape_tex.fill_to = Vector2(0.5, 0.0) # ray
|
||||
shape_tex.fill_from = Vector2(0.5, 0.5)
|
||||
shape_tex.fill_to = Vector2(0.5, 0.0)
|
||||
shape_tex.width = 64
|
||||
shape_tex.height = 64
|
||||
|
||||
transaction_material.set_shader_parameter("base_color", Color.BLACK)
|
||||
transaction_material.set_shader_parameter("base_color", base_color)
|
||||
transaction_material.set_shader_parameter("gradient_texture", grad_tex)
|
||||
transaction_material.set_shader_parameter("gradient_fixed", false)
|
||||
transaction_material.set_shader_parameter("shape_texture", shape_tex)
|
||||
transaction_material.set_shader_parameter("shape_tiling", 16.0)
|
||||
transaction_material.set_shader_parameter("shape_rotation", 0.0)
|
||||
transaction_material.set_shader_parameter("shape_scroll", Vector2.ZERO)
|
||||
transaction_material.set_shader_parameter("shape_feathering", 0.05)
|
||||
transaction_material.set_shader_parameter("shape_treshold", 1.0) # >=1 -> full at the end of the transation
|
||||
transaction_material.set_shader_parameter("width", 0.5)
|
||||
transaction_material.set_shader_parameter("shape_tiling", shape_tiling)
|
||||
transaction_material.set_shader_parameter("shape_rotation", shape_rotation)
|
||||
transaction_material.set_shader_parameter("shape_scroll", shape_scroll)
|
||||
transaction_material.set_shader_parameter("shape_feathering", shape_feathering)
|
||||
transaction_material.set_shader_parameter("shape_treshold", shape_treshold)
|
||||
transaction_material.set_shader_parameter("width", width)
|
||||
|
||||
color_rect.material = transaction_material
|
||||
|
||||
@@ -76,7 +128,17 @@ func reveal(duration := 0.5) -> void:
|
||||
await t.finished
|
||||
color_rect.visible = false
|
||||
|
||||
func change_scene_with_standard_fade(scene_enum: SceneConfig.SceneName, duration: float = transition_duration, show_loading_label: bool = false) -> void:
|
||||
func _setup_logo_safety() -> void:
|
||||
if logo and logo.texture:
|
||||
logo.visible = true
|
||||
var texture_center = logo.texture.get_size() / 2
|
||||
|
||||
if logo.pivot_offset != texture_center:
|
||||
var old_pivot = logo.pivot_offset
|
||||
logo.pivot_offset = texture_center
|
||||
logo.position -= (texture_center - old_pivot) * (Vector2.ONE - logo.scale)
|
||||
|
||||
func change_scene_with_standard_fade(scene_enum: SceneConfig.SceneName, show_loading_label: bool = true) -> void:
|
||||
if not config or not config.scenes.has(scene_enum):
|
||||
return
|
||||
|
||||
@@ -85,18 +147,31 @@ func change_scene_with_standard_fade(scene_enum: SceneConfig.SceneName, duration
|
||||
var target_scene: PackedScene = config.scenes[scene_enum]
|
||||
|
||||
color_rect.mouse_filter = Control.MOUSE_FILTER_STOP
|
||||
if show_loading_label:
|
||||
loading_screen.visible = true
|
||||
|
||||
await cover(duration)
|
||||
await cover(fade_in_duration)
|
||||
get_tree().change_scene_to_packed(target_scene)
|
||||
await reveal(duration)
|
||||
|
||||
|
||||
if show_loading_label:
|
||||
_setup_logo_safety()
|
||||
loading_screen.modulate.a = 0.0
|
||||
loading_screen.visible = true
|
||||
var tween_in = create_tween()
|
||||
tween_in.tween_property(loading_screen, "modulate:a", 1.0, logo_fade_in_duration)
|
||||
await tween_in.finished
|
||||
|
||||
if black_screen_duration > 0.0:
|
||||
await get_tree().create_timer(black_screen_duration).timeout
|
||||
|
||||
if show_loading_label:
|
||||
var tween_out = create_tween()
|
||||
tween_out.tween_property(loading_screen, "modulate:a", 0.0, logo_fade_out_duration)
|
||||
await tween_out.finished
|
||||
loading_screen.visible = false
|
||||
|
||||
await reveal(fade_out_duration)
|
||||
color_rect.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
|
||||
func change_scene(scene_enum: SceneConfig.SceneName, duration: float = transition_duration, show_loading_label: bool = false) -> void:
|
||||
func change_scene(scene_enum: SceneConfig.SceneName, show_loading_label: bool = true) -> void:
|
||||
if not config or not config.scenes.has(scene_enum):
|
||||
return
|
||||
|
||||
@@ -105,17 +180,29 @@ func change_scene(scene_enum: SceneConfig.SceneName, duration: float = transitio
|
||||
var target_scene: PackedScene = config.scenes[scene_enum]
|
||||
|
||||
color_rect.mouse_filter = Control.MOUSE_FILTER_STOP
|
||||
if show_loading_label:
|
||||
loading_screen.visible = true
|
||||
|
||||
await cover(duration)
|
||||
await cover(fade_in_duration)
|
||||
get_tree().change_scene_to_packed(target_scene)
|
||||
await reveal(duration)
|
||||
|
||||
|
||||
if show_loading_label:
|
||||
_setup_logo_safety()
|
||||
loading_screen.modulate.a = 0.0
|
||||
loading_screen.visible = true
|
||||
var tween_in = create_tween()
|
||||
tween_in.tween_property(loading_screen, "modulate:a", 1.0, logo_fade_in_duration)
|
||||
await tween_in.finished
|
||||
|
||||
if black_screen_duration > 0.0:
|
||||
await get_tree().create_timer(black_screen_duration).timeout
|
||||
|
||||
if show_loading_label:
|
||||
var tween_out = create_tween()
|
||||
tween_out.tween_property(loading_screen, "modulate:a", 0.0, logo_fade_out_duration)
|
||||
await tween_out.finished
|
||||
loading_screen.visible = false
|
||||
|
||||
await reveal(fade_out_duration)
|
||||
color_rect.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
|
||||
func quit_game() -> void:
|
||||
get_tree().quit()
|
||||
|
||||
|
||||
@@ -3,12 +3,16 @@
|
||||
[ext_resource type="Script" uid="uid://bf1f2kp8ghtei" path="res://core/scene_manager/scene_manager.gd" id="1_7resu"]
|
||||
[ext_resource type="Resource" uid="uid://dr612tmciq8pg" path="res://core/scene_manager/scene_config.tres" id="2_vtdwt"]
|
||||
[ext_resource type="Theme" uid="uid://bg8megpn77mod" path="res://core/font/main_theme.tres" id="3_j173j"]
|
||||
[ext_resource type="Texture2D" uid="uid://dlrq07g7w5gg8" path="res://core/splash_screen/tgcc_logo.png" id="4_k2alh"]
|
||||
|
||||
[node name="SceneManager" type="CanvasLayer" unique_id=399843239]
|
||||
process_mode = 3
|
||||
layer = 100
|
||||
script = ExtResource("1_7resu")
|
||||
config = ExtResource("2_vtdwt")
|
||||
fade_in_duration = 1.0
|
||||
black_screen_duration = 3.0
|
||||
fade_out_duration = 1.0
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=1075660170]
|
||||
anchors_preset = 15
|
||||
@@ -20,7 +24,6 @@ mouse_filter = 2
|
||||
color = Color(0, 0, 0, 0)
|
||||
|
||||
[node name="LoadingScreen" type="Control" parent="." unique_id=1075176512]
|
||||
visible = false
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@@ -46,3 +49,19 @@ theme = ExtResource("3_j173j")
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Loading..."
|
||||
uppercase = true
|
||||
|
||||
[node name="Logo" type="TextureRect" parent="LoadingScreen" unique_id=425934742]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -233.0
|
||||
offset_top = -236.0
|
||||
offset_right = 791.0
|
||||
offset_bottom = 788.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
scale = Vector2(0.22, 0.22)
|
||||
texture = ExtResource("4_k2alh")
|
||||
|
||||
@@ -1,17 +1,29 @@
|
||||
extends Control
|
||||
|
||||
@export var main_menu_scene: PackedScene
|
||||
@export var display_time: float = 2.0
|
||||
@export var fade_in_time: float = 0.5
|
||||
@export var initial_delay: float = 0.5
|
||||
@export var logo_fade_in_time: float = 1.0
|
||||
@export var logo_display_time: float = 2.0
|
||||
@export var logo_fade_out_time: float = 1.0
|
||||
@export var black_screen_delay: float = 0.5
|
||||
|
||||
@onready var logo: Sprite2D = $ColorRect/JMPLogo
|
||||
|
||||
func _ready() -> void:
|
||||
logo.modulate.a = 0.0
|
||||
await get_tree().create_timer(fade_in_time).timeout
|
||||
await get_tree().create_timer(initial_delay).timeout
|
||||
|
||||
var tween := create_tween()
|
||||
tween.tween_property(logo, "modulate:a", 1.0, fade_in_time).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)
|
||||
var tween_in := create_tween()
|
||||
tween_in.tween_property(logo, "modulate:a", 1.0, logo_fade_in_time).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)
|
||||
await tween_in.finished
|
||||
|
||||
await get_tree().create_timer(display_time).timeout
|
||||
#tween = create_tween()
|
||||
#tween.tween_property(logo, "modulate:a", 0.0, fade_in_time).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)
|
||||
SceneManager.change_scene_with_standard_fade(SceneConfig.SceneName.MAIN_MENU, 0.5)
|
||||
await get_tree().create_timer(logo_display_time).timeout
|
||||
|
||||
var tween_out := create_tween()
|
||||
tween_out.tween_property(logo, "modulate:a", 0.0, logo_fade_out_time).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_IN)
|
||||
await tween_out.finished
|
||||
|
||||
# Aspetta lo schermo nero prima di caricare il menu principale
|
||||
await get_tree().create_timer(black_screen_delay).timeout
|
||||
|
||||
get_tree().change_scene_to_packed(main_menu_scene)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
[ext_resource type="Script" uid="uid://ckj2pcoxi5j3" path="res://core/splash_screen/splash_screen.gd" id="1_elsnp"]
|
||||
[ext_resource type="Texture2D" uid="uid://dp3qxncy8u184" path="res://core/splash_screen/jmp_logo.png" id="1_jkpgl"]
|
||||
[ext_resource type="PackedScene" uid="uid://btcpge7cj2041" path="res://core/main_menu/main_menu.tscn" id="2_qmlqp"]
|
||||
|
||||
[node name="Control" type="Control" unique_id=163470013]
|
||||
layout_mode = 3
|
||||
@@ -11,6 +12,8 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_elsnp")
|
||||
main_menu_scene = ExtResource("2_qmlqp")
|
||||
logo_display_time = 1.25
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=1599828641]
|
||||
layout_mode = 1
|
||||
|
||||
BIN
core/splash_screen/tgcc_logo.png
Normal file
BIN
core/splash_screen/tgcc_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 240 KiB |
40
core/splash_screen/tgcc_logo.png.import
Normal file
40
core/splash_screen/tgcc_logo.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dlrq07g7w5gg8"
|
||||
path="res://.godot/imported/tgcc_logo.png-31dd91a5ccff8eb02e16f9fd08dfa111.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/splash_screen/tgcc_logo.png"
|
||||
dest_files=["res://.godot/imported/tgcc_logo.png-31dd91a5ccff8eb02e16f9fd08dfa111.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Reference in New Issue
Block a user