Add damage indicator

This commit is contained in:
Nathan Chapman 2025-05-18 14:16:18 -06:00
parent 072d3c18ba
commit c6cee88ab2
20 changed files with 564 additions and 162 deletions

BIN
assets/textures/terrain/sand_albedo_height.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bpamrp14tk2cp"
path.s3tc="res://.godot/imported/sand_albedo_height.png-568aa75c142f091bd9b6cfa9077b95da.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://assets/textures/terrain/sand_albedo_height.png"
dest_files=["res://.godot/imported/sand_albedo_height.png-568aa75c142f091bd9b6cfa9077b95da.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=2
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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

BIN
assets/textures/terrain/sand_normal_roughness.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dpq5k4rlimus8"
path.s3tc="res://.godot/imported/sand_normal_roughness.png-a161f64e16b4203ed6531156209a09bd.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://assets/textures/terrain/sand_normal_roughness.png"
dest_files=["res://.godot/imported/sand_normal_roughness.png-a161f64e16b4203ed6531156209a09bd.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=2
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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

View File

@ -15,6 +15,10 @@ run/main_scene="uid://dw0lbkh31rofd"
config/features=PackedStringArray("4.4", "Forward Plus")
config/icon="res://icon.svg"
[autoload]
VFXManager="*res://src/scenes/autoload/vfx_manager.tscn"
[editor_plugins]
enabled=PackedStringArray("res://addons/sky_3d/plugin.cfg", "res://addons/terrain_3d/plugin.cfg")

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dvw2tewa6weqo"]
[ext_resource type="Script" uid="uid://cfrxuprulebec" path="res://src/scripts/autoload/vfx_manager.gd" id="1_m3ah1"]
[node name="VFXManager" type="Node3D"]
script = ExtResource("1_m3ah1")

View File

@ -13,6 +13,9 @@
collision_layer = 9
script = ExtResource("1_jr6vw")
[node name="HealthComponent" parent="." node_paths=PackedStringArray("body") instance=ExtResource("3_r8u7w")]
body = NodePath("..")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("CapsuleShape3D_r8u7w")
@ -20,96 +23,114 @@ shape = SubResource("CapsuleShape3D_r8u7w")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
[node name="Skeleton3D" parent="Rig/CharacterRig/GameRig" index="0"]
bones/0/position = Vector3(0.00456601, 0.892184, -0.042095)
bones/0/rotation = Quaternion(0.12901, 1.18213e-07, 1.53792e-08, 0.991643)
bones/1/rotation = Quaternion(-0.0557102, -0.000419796, -0.00725055, 0.998421)
bones/2/position = Vector3(2.92864e-09, 0.146069, -1.41837e-08)
bones/2/rotation = Quaternion(-5.09534e-05, -0.00114452, -0.00296166, 0.999995)
bones/3/position = Vector3(-1.47189e-09, 0.199614, -1.60848e-08)
bones/3/rotation = Quaternion(-0.114224, -0.000833755, 0.0121002, 0.993381)
bones/4/position = Vector3(-5.26558e-10, 0.0915071, 3.04151e-08)
bones/4/rotation = Quaternion(0.294608, -1.80979e-05, 0.0010534, 0.955618)
bones/5/rotation = Quaternion(-0.0948564, -6.05011e-10, -3.10652e-08, 0.995491)
bones/6/rotation = Quaternion(-0.159207, 0.000415301, -0.00283079, 0.987241)
bones/7/position = Vector3(0.00456599, 0.892184, -0.0420949)
bones/7/rotation = Quaternion(-0.0846601, -0.749868, -0.385466, 0.530986)
bones/8/position = Vector3(0.00456597, 0.892184, -0.042095)
bones/8/rotation = Quaternion(-0.0846601, 0.749868, 0.385466, 0.530986)
bones/9/position = Vector3(0.13571, 0.958291, -0.0286274)
bones/9/rotation = Quaternion(0.989636, 0.0182557, -0.0302397, 0.139188)
bones/10/position = Vector3(-2.24327e-08, 0.265623, -1.36294e-08)
bones/10/rotation = Quaternion(-2.73796e-08, -0.0016426, 1.00354e-08, 0.999999)
bones/11/position = Vector3(-4.24728e-08, 0.265623, 2.08641e-08)
bones/11/rotation = Quaternion(0.470215, -0.0013125, 0.00196915, 0.882549)
bones/12/position = Vector3(2.61481e-08, 0.225629, 4.61823e-08)
bones/12/rotation = Quaternion(-4.33532e-09, -0.00612512, 4.06429e-08, 0.999981)
bones/13/position = Vector3(-2.65944e-08, 0.225629, 4.23111e-09)
bones/13/rotation = Quaternion(-0.742786, 0.0146494, 0.0175353, 0.669139)
bones/14/position = Vector3(-2.70177e-08, 0.139877, 1.31854e-08)
bones/14/rotation = Quaternion(-9.74438e-05, 0.967471, -0.252982, -0.000383242)
bones/15/position = Vector3(-0.126578, 0.958291, -0.0286274)
bones/15/rotation = Quaternion(0.975249, -0.00507204, 0.0278509, 0.219288)
bones/16/position = Vector3(-8.93548e-09, 0.26551, -3.21185e-08)
bones/16/rotation = Quaternion(-3.37645e-08, 0.00328853, -3.70663e-09, 0.999995)
bones/17/position = Vector3(1.62824e-08, 0.26551, 8.93908e-10)
bones/17/rotation = Quaternion(0.456119, 0.00342176, -0.00179418, 0.889911)
bones/18/position = Vector3(1.00718e-08, 0.22552, -8.66024e-09)
bones/18/rotation = Quaternion(-2.14363e-08, -0.00831094, 2.68876e-08, 0.999966)
bones/19/position = Vector3(-1.21786e-08, 0.22552, 8.60922e-09)
bones/19/rotation = Quaternion(-0.697936, -0.028454, 0.00123056, 0.715594)
bones/20/position = Vector3(-1.02697e-08, 0.139877, -3.90184e-09)
bones/20/rotation = Quaternion(-9.96277e-05, 0.967461, -0.253022, -0.000383048)
bones/21/position = Vector3(0.0288526, 1.4182, 0.0530444)
bones/21/rotation = Quaternion(-0.489654, -0.258379, -0.399737, 0.730541)
bones/22/position = Vector3(0.192189, 1.45595, -0.0124991)
bones/22/rotation = Quaternion(0.0308963, -0.142972, 0.978342, -0.146466)
bones/23/position = Vector3(-5.34181e-09, 0.143602, -3.56175e-08)
bones/23/rotation = Quaternion(7.28564e-08, -0.0194391, -5.17929e-09, 0.999811)
bones/24/position = Vector3(-6.2027e-08, 0.143602, 3.77969e-08)
bones/24/rotation = Quaternion(0.333449, -0.0228297, -0.0501688, 0.941156)
bones/25/position = Vector3(5.00852e-09, 0.127245, 8.23425e-09)
bones/25/rotation = Quaternion(1.60288e-07, 0.00380369, 7.11213e-08, 0.999993)
bones/26/position = Vector3(2.04767e-08, 0.127245, 1.84988e-08)
bones/26/rotation = Quaternion(-0.00454016, 0.003573, -0.0595397, 0.998209)
bones/28/rotation = Quaternion(0.702583, -0.000939752, -0.00133551, 0.7116)
bones/29/rotation = Quaternion(0.741121, 0.00218287, 0.00265386, 0.671363)
bones/32/rotation = Quaternion(0.592003, -0.0381348, -0.0906989, 0.799907)
bones/34/rotation = Quaternion(-0.06747, 0.718446, 0.0663966, 0.689112)
bones/35/rotation = Quaternion(0.580803, -0.000892082, -0.00149751, 0.814042)
bones/36/rotation = Quaternion(0.682777, 0.00174512, 0.002566, 0.73062)
bones/37/rotation = Quaternion(-0.00426513, 0.736714, 0.0394785, 0.675038)
bones/38/position = Vector3(-0.00622952, 0.0926415, -0.0236344)
bones/38/rotation = Quaternion(-0.109873, 0.743351, 0.0333506, 0.658973)
bones/39/rotation = Quaternion(0.630039, 0.00151958, 0.00237936, 0.776559)
bones/40/rotation = Quaternion(0.652643, -0.00308136, -0.004211, 0.757647)
bones/41/rotation = Quaternion(-0.0684174, 0.72411, 0.0332338, 0.685478)
bones/42/position = Vector3(-0.00715364, 0.0679857, -0.0481983)
bones/43/rotation = Quaternion(0.498693, -0.0202705, -0.0256952, 0.866161)
bones/46/position = Vector3(-0.00763592, 1.41808, 0.0529702)
bones/46/rotation = Quaternion(-0.509575, 0.218287, 0.374832, 0.743092)
bones/47/position = Vector3(-0.163133, 1.45507, -0.0294819)
bones/47/rotation = Quaternion(-0.0732756, -0.137378, 0.973718, 0.166228)
bones/48/position = Vector3(1.49147e-07, 0.143835, 1.73116e-08)
bones/48/rotation = Quaternion(-6.14769e-08, 0.0176991, -9.65687e-08, 0.999843)
bones/49/position = Vector3(8.75792e-09, 0.143836, -1.04759e-08)
bones/49/rotation = Quaternion(0.328342, 0.0202337, 0.0458229, 0.94323)
bones/50/position = Vector3(-1.37018e-07, 0.127489, 5.43997e-08)
bones/50/rotation = Quaternion(-7.06877e-08, -0.00244596, -1.13008e-07, 0.999997)
bones/51/position = Vector3(1.81555e-07, 0.127489, 4.93946e-08)
bones/51/rotation = Quaternion(-0.00835387, -0.00217926, 0.0268349, 0.999603)
bones/52/rotation = Quaternion(-0.2563, 0.855859, 0.0299185, -0.448241)
bones/53/rotation = Quaternion(0.694912, 0.107145, -0.103548, 0.703488)
bones/54/rotation = Quaternion(0.74112, -0.00218243, -0.00265405, 0.671363)
bones/59/position = Vector3(0.00316941, 0.0987207, 0.0147918)
bones/60/rotation = Quaternion(0.579984, 0.0462614, -0.0308755, 0.812727)
bones/61/rotation = Quaternion(0.682777, -0.00174717, -0.0025645, 0.73062)
bones/63/position = Vector3(0.00622955, 0.0926416, -0.0236344)
bones/65/rotation = Quaternion(0.692499, 0.00330364, 0.00403915, 0.7214)
bones/67/position = Vector3(0.0071537, 0.0679858, -0.0481984)
bones/71/position = Vector3(0.131284, 1.33873, -0.0170255)
bones/71/rotation = Quaternion(-0.00161625, 0.60429, 0.796762, -0.00107789)
bones/72/position = Vector3(-0.109309, 1.33794, -0.0175146)
bones/72/rotation = Quaternion(-0.00161614, 0.604211, 0.796822, -0.00107805)
bones/0/position = Vector3(6.72272e-15, 0.905293, -0.0481736)
bones/0/rotation = Quaternion(0.12582, 1.18262e-07, 1.49989e-08, 0.992053)
bones/1/rotation = Quaternion(-0.0566577, -0.00072973, -0.0117082, 0.998325)
bones/2/position = Vector3(3.20474e-09, 0.146689, -1.95578e-08)
bones/2/rotation = Quaternion(0.00347326, -0.000329942, 0.00321264, 0.999989)
bones/3/position = Vector3(-2.01263e-09, 0.202058, -2.51457e-08)
bones/3/rotation = Quaternion(-0.0916588, -0.000317234, 0.00852311, 0.995754)
bones/4/position = Vector3(3.02934e-10, 0.0925562, 3.91155e-08)
bones/4/rotation = Quaternion(0.272714, 1.54699e-08, 8.90955e-08, 0.962095)
bones/5/rotation = Quaternion(-0.0948564, -2.80691e-14, -2.26155e-08, 0.995491)
bones/6/rotation = Quaternion(-0.161624, -1.17208e-07, -2.19244e-08, 0.986852)
bones/7/position = Vector3(-2.58067e-08, 0.905293, -0.0481734)
bones/7/rotation = Quaternion(-0.0863677, -0.751104, -0.383052, 0.530711)
bones/8/position = Vector3(-2.81964e-08, 0.905293, -0.0481735)
bones/8/rotation = Quaternion(-0.0863677, 0.751104, 0.383052, 0.530711)
bones/9/position = Vector3(0.131144, 0.971498, -0.0351291)
bones/9/rotation = Quaternion(0.993778, 0.0204921, -0.0311302, 0.104955)
bones/10/position = Vector3(-2.36129e-08, 0.26601, -2.14789e-08)
bones/10/rotation = Quaternion(-3.13921e-08, -0.000695086, 1.20449e-08, 1)
bones/11/position = Vector3(-4.6306e-08, 0.26601, 2.42145e-08)
bones/11/rotation = Quaternion(0.405241, -0.000697979, 0.000309552, 0.91421)
bones/12/position = Vector3(3.05151e-08, 0.22603, 5.03768e-08)
bones/12/rotation = Quaternion(-8.19226e-09, -0.00710644, 4.16102e-08, 0.999975)
bones/13/position = Vector3(-2.95495e-08, 0.22603, 2.68392e-09)
bones/13/rotation = Quaternion(-0.745142, 0.0118616, 0.0243767, 0.666355)
bones/14/position = Vector3(-3.05481e-08, 0.139877, 1.64787e-08)
bones/14/rotation = Quaternion(-9.66743e-05, 0.967474, -0.252972, -0.000383447)
bones/15/position = Vector3(-0.131144, 0.971498, -0.0351291)
bones/15/rotation = Quaternion(0.974788, -0.00547874, 0.0275328, 0.221362)
bones/16/position = Vector3(-1.10042e-08, 0.265705, -3.31989e-08)
bones/16/rotation = Quaternion(-3.43227e-08, 0.00314323, 8.33075e-10, 0.999995)
bones/17/position = Vector3(1.83545e-08, 0.265705, 6.98543e-10)
bones/17/rotation = Quaternion(0.430468, 0.0032101, -0.00153107, 0.902599)
bones/18/position = Vector3(1.2807e-08, 0.225719, -8.28774e-09)
bones/18/rotation = Quaternion(-2.29017e-08, -0.00785732, 3.30149e-08, 0.999969)
bones/19/position = Vector3(-1.27748e-08, 0.225719, 1.12004e-08)
bones/19/rotation = Quaternion(-0.682168, -0.0281604, -0.00116315, 0.730653)
bones/20/position = Vector3(-1.30142e-08, 0.139877, -2.77457e-09)
bones/20/rotation = Quaternion(-9.96472e-05, 0.967461, -0.253021, -0.000383039)
bones/21/position = Vector3(0.0251286, 1.43509, 0.0454065)
bones/21/rotation = Quaternion(-0.478913, -0.263899, -0.410567, 0.729681)
bones/22/position = Vector3(0.190402, 1.47328, -0.0151475)
bones/22/rotation = Quaternion(0.0319583, -0.162418, 0.975193, -0.146963)
bones/23/position = Vector3(-5.41331e-09, 0.143946, -2.98023e-08)
bones/23/rotation = Quaternion(6.90306e-09, -0.0305202, 9.74957e-09, 0.999534)
bones/24/position = Vector3(-6.33301e-08, 0.143946, 4.3873e-08)
bones/24/rotation = Quaternion(0.332169, -0.0305209, -0.0206881, 0.942499)
bones/25/position = Vector3(1.30385e-08, 0.127601, 6.51926e-09)
bones/25/rotation = Quaternion(1.49943e-07, -1.20606e-07, 9.91859e-08, 1)
bones/26/position = Vector3(2.06034e-08, 0.127601, 2.42761e-08)
bones/26/rotation = Quaternion(-0.00824883, -0.00027077, -0.0328667, 0.999426)
bones/28/rotation = Quaternion(0.702583, -0.000939743, -0.00133552, 0.7116)
bones/29/rotation = Quaternion(0.741121, 0.00218291, 0.00265381, 0.671363)
bones/30/rotation = Quaternion(0.32527, 0.890055, 0.295977, -0.119997)
bones/31/rotation = Quaternion(0.514882, -0.114149, 0.114482, 0.841879)
bones/32/rotation = Quaternion(0.592003, -0.0381348, -0.090699, 0.799907)
bones/34/position = Vector3(-0.00316938, 0.0987206, 0.0147918)
bones/34/rotation = Quaternion(-0.0674699, 0.718446, 0.0663966, 0.689112)
bones/35/rotation = Quaternion(0.580803, -0.000892135, -0.0014975, 0.814042)
bones/36/rotation = Quaternion(0.682777, 0.00174509, 0.00256596, 0.73062)
bones/37/rotation = Quaternion(-0.00426514, 0.736714, 0.0394785, 0.675038)
bones/38/position = Vector3(-0.00622951, 0.0926415, -0.0236344)
bones/38/rotation = Quaternion(-0.109873, 0.743351, 0.0333507, 0.658973)
bones/39/rotation = Quaternion(0.630039, 0.00151959, 0.00237944, 0.776559)
bones/40/rotation = Quaternion(0.652643, -0.00308142, -0.00421108, 0.757648)
bones/41/rotation = Quaternion(-0.0684174, 0.72411, 0.0332337, 0.685478)
bones/42/position = Vector3(-0.00715362, 0.0679857, -0.0481983)
bones/42/rotation = Quaternion(-0.120913, 0.799109, 0.0358921, 0.587807)
bones/43/rotation = Quaternion(0.498693, -0.0202705, -0.0256953, 0.866161)
bones/44/rotation = Quaternion(0.715385, 0.035306, 0.0573145, 0.695481)
bones/45/rotation = Quaternion(-0.129059, 0.728936, -0.0250259, 0.67184)
bones/46/position = Vector3(-0.0113635, 1.43509, 0.0454064)
bones/46/rotation = Quaternion(-0.486267, 0.247954, 0.40003, 0.736234)
bones/47/position = Vector3(-0.173828, 1.47374, -0.0220533)
bones/47/rotation = Quaternion(-0.0353408, -0.143636, 0.975473, 0.163009)
bones/48/position = Vector3(1.88476e-07, 0.143946, 1.02445e-08)
bones/48/rotation = Quaternion(-1.12582e-07, 0.0406186, -1.19934e-07, 0.999175)
bones/49/position = Vector3(6.5191e-09, 0.143946, -1.95094e-08)
bones/49/rotation = Quaternion(0.369987, 0.0406191, 0.0286748, 0.927705)
bones/50/position = Vector3(-1.48779e-07, 0.1276, 5.9139e-08)
bones/50/rotation = Quaternion(-8.73115e-08, 2.7474e-08, -1.28057e-07, 1)
bones/51/position = Vector3(1.9461e-07, 0.127601, 6.06248e-08)
bones/51/rotation = Quaternion(-0.00824876, 0.000270832, 0.032867, 0.999426)
bones/52/rotation = Quaternion(-0.2563, 0.855859, 0.0299184, -0.448241)
bones/53/rotation = Quaternion(0.694912, 0.107145, -0.103549, 0.703488)
bones/54/rotation = Quaternion(0.74112, -0.00218237, -0.00265409, 0.671363)
bones/55/rotation = Quaternion(-0.325269, 0.890055, 0.295977, 0.119998)
bones/56/rotation = Quaternion(0.514882, 0.11415, -0.114483, 0.841879)
bones/57/rotation = Quaternion(0.592004, 0.0381346, 0.0906992, 0.799907)
bones/59/position = Vector3(0.00316943, 0.0987207, 0.0147917)
bones/59/rotation = Quaternion(0.138771, -0.704916, 0.15571, 0.677932)
bones/60/rotation = Quaternion(0.579984, 0.0462615, -0.0308755, 0.812727)
bones/61/rotation = Quaternion(0.682777, -0.00174718, -0.00256448, 0.73062)
bones/62/rotation = Quaternion(-0.00426532, -0.736714, -0.0394788, 0.675038)
bones/63/position = Vector3(0.00622955, 0.0926417, -0.0236344)
bones/63/rotation = Quaternion(0.104095, -0.719607, 0.186262, 0.660784)
bones/64/rotation = Quaternion(0.670693, 0.0163391, -0.0185663, 0.741323)
bones/65/rotation = Quaternion(0.692499, 0.00330364, 0.00403917, 0.7214)
bones/66/rotation = Quaternion(-0.0684178, -0.72411, -0.0332339, 0.685477)
bones/67/position = Vector3(0.00715371, 0.0679859, -0.0481984)
bones/67/rotation = Quaternion(0.108364, -0.768224, 0.166291, 0.608635)
bones/68/rotation = Quaternion(0.629954, 0.0295149, 0.0177509, 0.775869)
bones/69/rotation = Quaternion(0.816678, -0.0439534, -0.0509861, 0.573155)
bones/70/rotation = Quaternion(-0.12906, -0.728937, 0.0250258, 0.67184)
bones/71/position = Vector3(0.127191, 1.35512, -0.0251734)
bones/71/rotation = Quaternion(1.99346e-08, 0.603904, 0.797057, -4.60709e-08)
bones/72/position = Vector3(-0.113426, 1.35512, -0.0251734)
bones/72/rotation = Quaternion(1.99345e-08, 0.603906, 0.797055, -4.60709e-08)
[node name="Knight_02" parent="Rig/CharacterRig/GameRig/Skeleton3D" index="1"]
visible = false
@ -118,10 +139,10 @@ visible = false
visible = true
[node name="RightHandBone" parent="Rig" index="2"]
transform = Transform3D(-0.966066, -0.254338, -0.0450501, 0.217973, -0.896328, 0.386114, -0.138583, 0.363192, 0.92135, -0.328629, 0.970591, -0.0189936)
transform = Transform3D(-0.962343, -0.270802, -0.0237135, 0.229153, -0.855067, 0.465135, -0.146236, 0.442185, 0.884922, -0.347645, 1.00111, 0.00781806)
[node name="LeftHandBone" parent="Rig" index="3"]
transform = Transform3D(-0.993941, 0.109764, -0.00572588, -0.103525, -0.917407, 0.384249, 0.0369236, 0.382514, 0.923212, 0.329758, 0.964977, 0.00212026)
transform = Transform3D(-0.970513, 0.239108, 0.0305212, -0.213913, -0.912694, 0.348182, 0.11111, 0.331387, 0.93693, 0.347212, 0.985677, -0.0225898)
[node name="tall_shield" parent="Rig/LeftHandBone/OffHandSlot" index="0"]
visible = false
@ -136,10 +157,8 @@ collision_mask = 4
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1)
collision_mask = 4
[node name="HealthComponent" parent="." instance=ExtResource("3_r8u7w")]
[connection signal="heavy_attack" from="Rig" to="." method="_on_rig_heavy_attack"]
[connection signal="defeat" from="HealthComponent" to="." method="_on_health_component_defeat"]
[connection signal="heavy_attack" from="Rig" to="." method="_on_rig_heavy_attack"]
[editable path="Rig"]
[editable path="Rig/CharacterRig"]

View File

@ -22,7 +22,8 @@ collision_layer = 5
script = ExtResource("1_swhsd")
stats = SubResource("Resource_wdvff")
[node name="HealthComponent" parent="." instance=ExtResource("2_0xash")]
[node name="HealthComponent" parent="." node_paths=PackedStringArray("body") instance=ExtResource("2_0xash")]
body = NodePath("..")
[node name="CollisionShape" type="CollisionShape3D" parent="."]
shape = SubResource("CapsuleShape3D_yx56f")
@ -46,46 +47,123 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
[node name="Rig" parent="RigPivot" instance=ExtResource("3_n52bt")]
[node name="Skeleton3D" parent="RigPivot/Rig/CharacterRig/GameRig" index="0"]
bones/0/position = Vector3(3.42696e-15, 0.896489, -0.0481736)
bones/2/rotation = Quaternion(-0.00222335, -0.000422265, 0.0032149, 0.999992)
bones/3/rotation = Quaternion(-0.0968345, -0.000384538, 0.00851983, 0.995264)
bones/4/rotation = Quaternion(0.277419, 1.53073e-08, 9.16828e-08, 0.960749)
bones/6/rotation = Quaternion(-0.155723, -1.17855e-07, -1.79193e-08, 0.987801)
bones/7/position = Vector3(-2.1299e-08, 0.896489, -0.0481734)
bones/8/position = Vector3(-4.01025e-08, 0.896489, -0.0481735)
bones/9/position = Vector3(0.131144, 0.962694, -0.0351291)
bones/9/rotation = Quaternion(0.992921, 0.0209228, -0.0309253, 0.112755)
bones/11/rotation = Quaternion(0.42287, -0.000700608, 0.000327092, 0.90619)
bones/13/rotation = Quaternion(-0.752734, 0.0118897, 0.0244102, 0.657765)
bones/15/position = Vector3(-0.131144, 0.962694, -0.0351291)
bones/15/rotation = Quaternion(0.972934, -0.00583165, 0.0272878, 0.229394)
bones/17/rotation = Quaternion(0.446755, 0.0033064, -0.00165122, 0.894649)
bones/19/rotation = Quaternion(-0.68928, -0.0281984, -0.000656595, 0.723945)
bones/21/position = Vector3(0.0251286, 1.42672, 0.0422261)
bones/21/rotation = Quaternion(-0.493751, -0.25781, -0.399714, 0.727992)
bones/22/position = Vector3(0.18843, 1.46351, -0.0242517)
bones/22/rotation = Quaternion(0.0506715, -0.159567, 0.9744, -0.150053)
bones/23/rotation = Quaternion(5.80698e-08, -0.0152922, 5.38809e-08, 0.999883)
bones/24/rotation = Quaternion(0.29749, -0.0152929, -0.018172, 0.95443)
bones/46/position = Vector3(-0.0113635, 1.42672, 0.0422261)
bones/46/rotation = Quaternion(-0.513008, 0.218555, 0.372878, 0.741632)
bones/47/position = Vector3(-0.166658, 1.46394, -0.0410617)
bones/47/rotation = Quaternion(-0.0780109, -0.136362, 0.972991, 0.169141)
bones/48/rotation = Quaternion(1.95859e-08, 0.0116753, 7.80851e-09, 0.999932)
bones/49/rotation = Quaternion(0.330118, 0.0116759, 0.0289322, 0.943424)
bones/71/position = Vector3(0.127191, 1.34509, -0.0264149)
bones/71/rotation = Quaternion(1.92827e-08, 0.613422, 0.789755, -4.64325e-08)
bones/72/position = Vector3(-0.113426, 1.34509, -0.0264149)
bones/72/rotation = Quaternion(1.92828e-08, 0.613422, 0.789755, -4.64324e-08)
bones/0/position = Vector3(4.44089e-15, 0.908602, -0.0481736)
bones/0/rotation = Quaternion(0.12582, 1.18262e-07, 1.49989e-08, 0.992053)
bones/1/rotation = Quaternion(-0.0566577, -0.00072973, -0.0117082, 0.998325)
bones/2/position = Vector3(3.20474e-09, 0.146689, -1.95578e-08)
bones/2/rotation = Quaternion(0.00557797, -0.000295829, 0.00321172, 0.999979)
bones/3/position = Vector3(-2.01263e-09, 0.202058, -2.51457e-08)
bones/3/rotation = Quaternion(-0.0897188, -0.000291992, 0.00852419, 0.995931)
bones/4/position = Vector3(3.02934e-10, 0.0925562, 3.91155e-08)
bones/4/rotation = Quaternion(0.270961, 1.46734e-08, 9.11671e-08, 0.96259)
bones/5/rotation = Quaternion(-0.0948564, -2.80691e-14, -2.26155e-08, 0.995491)
bones/6/rotation = Quaternion(-0.16386, -1.17681e-07, -1.90351e-08, 0.986484)
bones/7/position = Vector3(-2.52885e-08, 0.908602, -0.0481735)
bones/7/rotation = Quaternion(-0.0863677, -0.751104, -0.383052, 0.530711)
bones/8/position = Vector3(-7.81021e-08, 0.908602, -0.0481735)
bones/8/rotation = Quaternion(-0.0863677, 0.751104, 0.383052, 0.530711)
bones/9/position = Vector3(0.131144, 0.974806, -0.0351291)
bones/9/rotation = Quaternion(0.994101, 0.0203247, -0.031211, 0.101863)
bones/10/position = Vector3(-2.36129e-08, 0.26601, -2.14789e-08)
bones/10/rotation = Quaternion(-3.13921e-08, -0.000695086, 1.20449e-08, 1)
bones/11/position = Vector3(-4.6306e-08, 0.26601, 2.42145e-08)
bones/11/rotation = Quaternion(0.398241, -0.000696108, 0.000302346, 0.917281)
bones/12/position = Vector3(3.05151e-08, 0.22603, 5.03768e-08)
bones/12/rotation = Quaternion(-8.19226e-09, -0.00710644, 4.16102e-08, 0.999975)
bones/13/position = Vector3(-2.95495e-08, 0.22603, 2.68392e-09)
bones/13/rotation = Quaternion(-0.742137, 0.0118505, 0.0243655, 0.6697)
bones/14/position = Vector3(-3.05481e-08, 0.139877, 1.64787e-08)
bones/14/rotation = Quaternion(-9.66743e-05, 0.967474, -0.252972, -0.000383447)
bones/15/position = Vector3(-0.131144, 0.974806, -0.0351291)
bones/15/rotation = Quaternion(0.97549, -0.00534217, 0.0276274, 0.218238)
bones/16/position = Vector3(-1.10042e-08, 0.265705, -3.31989e-08)
bones/16/rotation = Quaternion(-3.43227e-08, 0.00314323, 8.33075e-10, 0.999995)
bones/17/position = Vector3(1.83545e-08, 0.265705, 6.98543e-10)
bones/17/rotation = Quaternion(0.424128, 0.00317259, -0.00148598, 0.905596)
bones/18/position = Vector3(1.2807e-08, 0.225719, -8.28774e-09)
bones/18/rotation = Quaternion(-2.29017e-08, -0.00785732, 3.30149e-08, 0.999969)
bones/19/position = Vector3(-1.27748e-08, 0.225719, 1.12004e-08)
bones/19/rotation = Quaternion(-0.679419, -0.0281455, -0.00135688, 0.73321)
bones/20/position = Vector3(-1.30142e-08, 0.139877, -2.77457e-09)
bones/20/rotation = Quaternion(-9.96472e-05, 0.967461, -0.253021, -0.000383039)
bones/21/position = Vector3(0.0251286, 1.43822, 0.0465997)
bones/21/rotation = Quaternion(-0.473296, -0.266141, -0.414697, 0.730196)
bones/22/position = Vector3(0.191109, 1.47689, -0.0116832)
bones/22/rotation = Quaternion(0.0248291, -0.163488, 0.9754, -0.145772)
bones/23/position = Vector3(-5.41331e-09, 0.143946, -2.98023e-08)
bones/23/rotation = Quaternion(3.5172e-08, -0.0362841, 3.9968e-08, 0.999342)
bones/24/position = Vector3(-6.33301e-08, 0.143946, 4.3873e-08)
bones/24/rotation = Quaternion(0.345166, -0.0362848, -0.0215455, 0.937592)
bones/25/position = Vector3(1.30385e-08, 0.127601, 6.51926e-09)
bones/25/rotation = Quaternion(1.49943e-07, -1.20606e-07, 9.91859e-08, 1)
bones/26/position = Vector3(2.06034e-08, 0.127601, 2.42761e-08)
bones/26/rotation = Quaternion(-0.00824883, -0.00027077, -0.0328667, 0.999426)
bones/28/rotation = Quaternion(0.702583, -0.000939743, -0.00133552, 0.7116)
bones/29/rotation = Quaternion(0.741121, 0.00218291, 0.00265381, 0.671363)
bones/30/rotation = Quaternion(0.32527, 0.890055, 0.295977, -0.119997)
bones/31/rotation = Quaternion(0.514882, -0.114149, 0.114482, 0.841879)
bones/32/rotation = Quaternion(0.592003, -0.0381348, -0.090699, 0.799907)
bones/34/position = Vector3(-0.00316938, 0.0987206, 0.0147918)
bones/34/rotation = Quaternion(-0.0674699, 0.718446, 0.0663966, 0.689112)
bones/35/rotation = Quaternion(0.580803, -0.000892135, -0.0014975, 0.814042)
bones/36/rotation = Quaternion(0.682777, 0.00174509, 0.00256596, 0.73062)
bones/37/rotation = Quaternion(-0.00426514, 0.736714, 0.0394785, 0.675038)
bones/38/position = Vector3(-0.00622951, 0.0926415, -0.0236344)
bones/38/rotation = Quaternion(-0.109873, 0.743351, 0.0333507, 0.658973)
bones/39/rotation = Quaternion(0.630039, 0.00151959, 0.00237944, 0.776559)
bones/40/rotation = Quaternion(0.652643, -0.00308142, -0.00421108, 0.757648)
bones/41/rotation = Quaternion(-0.0684174, 0.72411, 0.0332337, 0.685478)
bones/42/position = Vector3(-0.00715362, 0.0679857, -0.0481983)
bones/42/rotation = Quaternion(-0.120913, 0.799109, 0.0358921, 0.587807)
bones/43/rotation = Quaternion(0.498693, -0.0202705, -0.0256953, 0.866161)
bones/44/rotation = Quaternion(0.715385, 0.035306, 0.0573145, 0.695481)
bones/45/rotation = Quaternion(-0.129059, 0.728936, -0.0250259, 0.67184)
bones/46/position = Vector3(-0.0113635, 1.43822, 0.0465997)
bones/46/rotation = Quaternion(-0.476105, 0.258893, 0.410235, 0.733489)
bones/47/position = Vector3(-0.176177, 1.47719, -0.0147045)
bones/47/rotation = Quaternion(-0.0191112, -0.146327, 0.975926, 0.160597)
bones/48/position = Vector3(1.88476e-07, 0.143946, 1.02445e-08)
bones/48/rotation = Quaternion(1.18242e-07, 0.0515202, 1.4879e-07, 0.998672)
bones/49/position = Vector3(6.5191e-09, 0.143946, -1.95094e-08)
bones/49/rotation = Quaternion(0.38489, 0.0515208, 0.0282148, 0.921091)
bones/50/position = Vector3(-1.48779e-07, 0.1276, 5.9139e-08)
bones/50/rotation = Quaternion(-8.73115e-08, 2.7474e-08, -1.28057e-07, 1)
bones/51/position = Vector3(1.9461e-07, 0.127601, 6.06248e-08)
bones/51/rotation = Quaternion(-0.00824876, 0.000270832, 0.032867, 0.999426)
bones/52/rotation = Quaternion(-0.2563, 0.855859, 0.0299184, -0.448241)
bones/53/rotation = Quaternion(0.694912, 0.107145, -0.103549, 0.703488)
bones/54/rotation = Quaternion(0.74112, -0.00218237, -0.00265409, 0.671363)
bones/55/rotation = Quaternion(-0.325269, 0.890055, 0.295977, 0.119998)
bones/56/rotation = Quaternion(0.514882, 0.11415, -0.114483, 0.841879)
bones/57/rotation = Quaternion(0.592004, 0.0381346, 0.0906992, 0.799907)
bones/59/position = Vector3(0.00316943, 0.0987207, 0.0147917)
bones/59/rotation = Quaternion(0.138771, -0.704916, 0.15571, 0.677932)
bones/60/rotation = Quaternion(0.579984, 0.0462615, -0.0308755, 0.812727)
bones/61/rotation = Quaternion(0.682777, -0.00174718, -0.00256448, 0.73062)
bones/62/rotation = Quaternion(-0.00426532, -0.736714, -0.0394788, 0.675038)
bones/63/position = Vector3(0.00622955, 0.0926417, -0.0236344)
bones/63/rotation = Quaternion(0.104095, -0.719607, 0.186262, 0.660784)
bones/64/rotation = Quaternion(0.670693, 0.0163391, -0.0185663, 0.741323)
bones/65/rotation = Quaternion(0.692499, 0.00330364, 0.00403917, 0.7214)
bones/66/rotation = Quaternion(-0.0684178, -0.72411, -0.0332339, 0.685477)
bones/67/position = Vector3(0.00715371, 0.0679859, -0.0481984)
bones/67/rotation = Quaternion(0.108364, -0.768224, 0.166291, 0.608635)
bones/68/rotation = Quaternion(0.629954, 0.0295149, 0.0177509, 0.775869)
bones/69/rotation = Quaternion(0.816678, -0.0439534, -0.0509861, 0.573155)
bones/70/rotation = Quaternion(-0.12906, -0.728937, 0.0250258, 0.67184)
bones/71/position = Vector3(0.127191, 1.3589, -0.0246982)
bones/71/rotation = Quaternion(2.01819e-08, 0.60028, 0.79979, -4.59287e-08)
bones/72/position = Vector3(-0.113426, 1.3589, -0.0246982)
bones/72/rotation = Quaternion(2.0182e-08, 0.60028, 0.79979, -4.59287e-08)
[node name="RightHandBone" parent="RigPivot/Rig" index="2"]
transform = Transform3D(-0.962342, -0.270805, -0.0237117, 0.24142, -0.891486, 0.383366, -0.124956, 0.363205, 0.923292, -0.340475, 0.981905, -0.0307815)
transform = Transform3D(-0.962343, -0.270801, -0.0237148, 0.224021, -0.839459, 0.4951, -0.153981, 0.471143, 0.868512, -0.349993, 1.00858, 0.0223412)
[node name="LeftHandBone" parent="RigPivot/Rig" index="3"]
transform = Transform3D(-0.970513, 0.239109, 0.0305209, -0.22183, -0.935488, 0.275051, 0.094319, 0.26017, 0.960945, 0.345241, 0.969934, -0.0494441)
transform = Transform3D(-0.970513, 0.239108, 0.0305213, -0.210586, -0.902654, 0.375325, 0.117293, 0.357831, 0.92639, 0.347919, 0.991902, -0.0125405)
[node name="RayAttachment" type="BoneAttachment3D" parent="RigPivot/Rig"]
transform = Transform3D(-0.962342, -0.270805, -0.0237117, 0.24142, -0.891486, 0.383366, -0.124956, 0.363205, 0.923292, -0.340475, 0.981905, -0.0307815)
transform = Transform3D(-0.962343, -0.270801, -0.0237148, 0.224021, -0.839459, 0.4951, -0.153981, 0.471143, 0.868512, -0.349993, 1.00858, 0.0223412)
bone_name = "DEF-hand.R"
bone_idx = 51
use_external_skeleton = true

View File

@ -1,7 +1,9 @@
[gd_scene load_steps=17 format=3 uid="uid://dw0lbkh31rofd"]
[gd_scene load_steps=26 format=3 uid="uid://dw0lbkh31rofd"]
[ext_resource type="Script" uid="uid://bmywk4wvcp0lr" path="res://addons/sky_3d/src/Sky3D.gd" id="1_1jhfv"]
[ext_resource type="Texture2D" uid="uid://bpamrp14tk2cp" path="res://assets/textures/terrain/sand_albedo_height.png" id="1_7iny7"]
[ext_resource type="PackedScene" uid="uid://nsv4lbw7j8mi" path="res://src/scenes/characters/player.tscn" id="1_crbv0"]
[ext_resource type="Texture2D" uid="uid://dpq5k4rlimus8" path="res://assets/textures/terrain/sand_normal_roughness.png" id="2_cxs0p"]
[ext_resource type="PackedScene" uid="uid://b1fe4n68iivfm" path="res://assets/models/environment/rock_cliff_env_03.glb" id="2_d2tjv"]
[ext_resource type="Script" uid="uid://27fj74ofndim" path="res://addons/sky_3d/src/Skydome.gd" id="2_juj6f"]
[ext_resource type="Script" uid="uid://bm0hx4mklpml" path="res://addons/sky_3d/src/TimeOfDay.gd" id="3_0eo66"]
@ -12,6 +14,88 @@
[ext_resource type="PackedScene" uid="uid://6dmbuecqolod" path="res://src/scenes/structures/fire_pit.tscn" id="10_juj6f"]
[ext_resource type="PackedScene" uid="uid://rkhiaud0rlq6" path="res://src/scenes/structures/lamp.tscn" id="11_0eo66"]
[sub_resource type="Gradient" id="Gradient_0eo66"]
offsets = PackedFloat32Array(0.2, 1)
colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1)
[sub_resource type="FastNoiseLite" id="FastNoiseLite_dn2un"]
noise_type = 2
frequency = 0.03
cellular_jitter = 3.0
cellular_return_type = 0
domain_warp_enabled = true
domain_warp_type = 1
domain_warp_amplitude = 50.0
domain_warp_fractal_type = 2
domain_warp_fractal_lacunarity = 1.5
domain_warp_fractal_gain = 1.0
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_7iny7"]
seamless = true
color_ramp = SubResource("Gradient_0eo66")
noise = SubResource("FastNoiseLite_dn2un")
[sub_resource type="Terrain3DMaterial" id="Terrain3DMaterial_cxs0p"]
_shader_parameters = {
&"bias_distance": 512.0,
&"blend_sharpness": 0.87,
&"depth_blur": 0.0,
&"enable_macro_variation": true,
&"enable_projection": true,
&"height_blending": true,
&"macro_variation1": Color(1, 1, 1, 1),
&"macro_variation2": Color(1, 1, 1, 1),
&"macro_variation_slope": 0.333,
&"mipmap_bias": 1.0,
&"noise1_angle": 0.0,
&"noise1_offset": Vector2(0.5, 0.5),
&"noise1_scale": 0.04,
&"noise2_scale": 0.076,
&"noise3_scale": 0.225,
&"noise_texture": SubResource("NoiseTexture2D_7iny7"),
&"projection_angular_division": 2.0,
&"projection_threshold": 0.8,
&"world_noise_fragment_normals": false,
&"world_noise_height": 64.0,
&"world_noise_lod_distance": 7500.0,
&"world_noise_max_octaves": 4,
&"world_noise_min_octaves": 2,
&"world_noise_offset": Vector3(0, 0, 0),
&"world_noise_region_blend": 0.33,
&"world_noise_scale": 5.0,
&"world_space_normal_blend": true
}
world_background = 2
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0slur"]
transparency = 4
cull_mode = 2
vertex_color_use_as_albedo = true
backlight_enabled = true
backlight = Color(0.5, 0.5, 0.5, 1)
distance_fade_mode = 1
distance_fade_min_distance = 128.0
distance_fade_max_distance = 96.0
[sub_resource type="Terrain3DMeshAsset" id="Terrain3DMeshAsset_856t6"]
generated_type = 1
height_offset = 0.5
material_override = SubResource("StandardMaterial3D_0slur")
last_lod = 0
last_shadow_lod = 0
lod0_range = 128.0
[sub_resource type="Terrain3DTextureAsset" id="Terrain3DTextureAsset_0slur"]
name = "sand_albedo_height"
albedo_color = Color(0.923345, 0.815778, 0.628408, 1)
albedo_texture = ExtResource("1_7iny7")
normal_texture = ExtResource("2_cxs0p")
roughness = 0.286
[sub_resource type="Terrain3DAssets" id="Terrain3DAssets_vltgv"]
mesh_list = Array[Terrain3DMeshAsset]([SubResource("Terrain3DMeshAsset_856t6")])
texture_list = Array[Terrain3DTextureAsset]([SubResource("Terrain3DTextureAsset_0slur")])
[sub_resource type="PhysicalSkyMaterial" id="PhysicalSkyMaterial_dn2un"]
use_debanding = false
@ -22,36 +106,37 @@ sky_material = SubResource("PhysicalSkyMaterial_dn2un")
background_mode = 2
sky = SubResource("Sky_7iny7")
ambient_light_source = 3
ambient_light_color = Color(0.235156, 0.278907, 0.35, 1)
ambient_light_sky_contribution = 0.7
ambient_light_color = Color(1, 1, 1, 1)
reflected_light_source = 2
tonemap_mode = 3
tonemap_white = 6.0
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_0slur"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_d2tjv"]
albedo_color = Color(0.321569, 0.317647, 0.117647, 1)
[node name="Level" type="Node3D"]
[node name="Terrain3D" type="Terrain3D" parent="."]
data_directory = "res://src/resources/terrain_data"
material = SubResource("Terrain3DMaterial_cxs0p")
assets = SubResource("Terrain3DAssets_vltgv")
top_level = true
metadata/_edit_lock_ = true
[node name="Sky3D" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_cxs0p")
camera_attributes = SubResource("CameraAttributesPractical_0slur")
script = ExtResource("1_1jhfv")
current_time = 2.13
current_time = 11.5
metadata/_custom_type_script = "uid://bmywk4wvcp0lr"
[node name="SunLight" type="DirectionalLight3D" parent="Sky3D"]
transform = Transform3D(0, -0.423059, 0.906102, 0.999297, -0.0339567, -0.0158544, 0.0374756, 0.905466, 0.422762, 0.906102, -0.0158543, 0.422762)
light_color = Color(0.98, 0.523, 0.294, 1)
light_energy = 0.0
transform = Transform3D(0, -0.996487, 0.0837498, 0.631677, 0.0649255, 0.772508, -0.775232, 0.0529029, 0.629458, 0.0837499, 0.772508, 0.629458)
shadow_enabled = true
[node name="MoonLight" type="DirectionalLight3D" parent="Sky3D"]
transform = Transform3D(0, -0.956847, -0.290593, -0.200031, -0.28472, 0.937509, -0.97979, 0.0581276, -0.191399, -0.290592, 0.937509, -0.191399)
transform = Transform3D(0, -0.570079, -0.82159, -0.5765, -0.671319, 0.46581, -0.817097, 0.473646, -0.328651, -0.82159, 0.46581, -0.32865)
light_color = Color(0.572549, 0.776471, 0.956863, 1)
light_energy = 0.281253
light_energy = 0.0
shadow_enabled = true
[node name="Skydome" type="Node" parent="Sky3D"]
@ -64,8 +149,8 @@ ground_color = Color(0.3, 0.3, 0.3, 1)
sky_layers = 4
sky_render_priority = -128
horizon_level = 0.0
sun_altitude = -147.012
sun_azimuth = -107.961
sun_altitude = -39.4203
sun_azimuth = -172.421
sun_disk_color = Color(0.996094, 0.541334, 0.140076, 1)
sun_disk_intensity = 2.0
sun_disk_size = 0.015
@ -73,8 +158,8 @@ sun_light_path = NodePath("../SunLight")
sun_light_color = Color(1, 1, 1, 1)
sun_horizon_light_color = Color(0.98, 0.523, 0.294, 1)
sun_light_energy = 1.0
moon_altitude = -20.3627
moon_azimuth = -303.371
moon_altitude = -133.862
moon_azimuth = -337.164
moon_color = Color(1, 1, 1, 1)
moon_size = 0.07
enable_set_moon_texture = false
@ -82,7 +167,7 @@ moon_resolution = 2
moon_light_path = NodePath("../MoonLight")
moon_light_color = Color(0.572549, 0.776471, 0.956863, 1)
moon_light_energy = 0.3
deep_space_euler = Vector3(1.29154, 3.14159, -2.30693)
deep_space_euler = Vector3(1.29154, 3.14159, 1.51595)
background_color = Color(0.709804, 0.709804, 0.709804, 0.854902)
set_background_texture = false
stars_field_color = Color(1, 1, 1, 1)
@ -151,7 +236,7 @@ update_in_editor = false
dome_path = NodePath("../Skydome")
system_sync = false
total_cycle_in_minutes = 15.0
total_hours = 2.13
total_hours = 11.5
day = 1
month = 1
year = 2025
@ -162,19 +247,13 @@ latitude = 16.0
longitude = 108.0
utc = 7.0
[node name="Floor" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0)
use_collision = true
size = Vector3(50, 1, 50)
material = SubResource("StandardMaterial3D_d2tjv")
[node name="Player" parent="." instance=ExtResource("1_crbv0")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.00648, 1, 2.32963)
[node name="MapBoundary" type="Node3D" parent="."]
[node name="RockWall" parent="MapBoundary" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.05985, -22.2671)
transform = Transform3D(0.917886, 0, -0.396844, 0, 1, 0, 0.396844, 0, 0.917886, -13.3334, 2.05985, -57.565)
[node name="rock_cliff_env_04" parent="MapBoundary/RockWall" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.5823, 0, 0)
@ -183,7 +262,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.5823, 0, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 16.2971, 0, 0)
[node name="RockWall4" parent="MapBoundary" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.05985, 24.7329)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.70471, 2.05985, 44.4208)
[node name="rock_cliff_env_04" parent="MapBoundary/RockWall4" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.5823, 0, 0)
@ -192,7 +271,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.5823, 0, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 16.2971, 0, 0)
[node name="RockWall2" parent="MapBoundary" instance=ExtResource("2_d2tjv")]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -22, 2.05985, -0.474918)
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -48.1166, 2.05985, -9.94744)
[node name="rock_cliff_env_04" parent="MapBoundary/RockWall2" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.5823, 0, 0)
@ -201,10 +280,10 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.5823, 0, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 16.2971, 0, 0)
[node name="RockWall3" parent="MapBoundary" instance=ExtResource("2_d2tjv")]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 25.8467, 2.05985, -0.474918)
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 47.4902, 2.05985, 3.70717)
[node name="rock_cliff_env_04" parent="MapBoundary/RockWall3" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.5823, 0, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8124, 0, 20.4483)
[node name="rock_cliff_env_05" parent="MapBoundary/RockWall3" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 16.2971, 0, 0)
@ -240,8 +319,26 @@ transform = Transform3D(0.910684, 0, 0.413104, 0, 1, 0, -0.413104, 0, 0.910684,
[node name="Enemy4" parent="Enemies" instance=ExtResource("6_uvsco")]
transform = Transform3D(-0.503623, 0, 0.863923, 0, 1, 0, -0.863923, 0, -0.503623, -5.81376, 1, 15.3224)
[node name="Enemy5" parent="Enemies" instance=ExtResource("6_uvsco")]
transform = Transform3D(-0.849359, 0, -0.527816, 0, 1, 0, 0.527816, 0, -0.849359, 9.96593, 1, -9.51454)
[node name="Enemy6" parent="Enemies" instance=ExtResource("6_uvsco")]
transform = Transform3D(-0.285538, 0, -0.958367, 0, 1, 0, 0.958367, 0, -0.285538, 12.7363, 1, -18.8134)
[node name="Enemy7" parent="Enemies" instance=ExtResource("6_uvsco")]
transform = Transform3D(0.135871, 0, -0.990727, 0, 1, 0, 0.990727, 0, 0.135871, 21.2639, 1, -23.2961)
[node name="Enemy8" parent="Enemies" instance=ExtResource("6_uvsco")]
transform = Transform3D(0.971759, 0, 0.235973, 0, 1, 0, -0.235973, 0, 0.971759, -8.27889, 1, -26.4981)
[node name="FirePit" parent="." instance=ExtResource("10_juj6f")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9.96342, 0, 3.24593)
[node name="Lamp" parent="." instance=ExtResource("11_0eo66")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.5327, -3.57628e-07, -11.138)
[node name="Lamp2" parent="." instance=ExtResource("11_0eo66")]
transform = Transform3D(-0.685247, 0, -0.728311, 0, 1, 0, 0.728311, 0, -0.685247, 16.1912, -3.57628e-07, -17.5002)
[node name="Lamp3" parent="." instance=ExtResource("11_0eo66")]
transform = Transform3D(0.809704, 0, 0.586839, 0, 1, 0, -0.586839, 0, 0.809704, -17.586, -2.26498e-06, 15.4729)

View File

@ -8,6 +8,7 @@
[node name="OmniLight3D" type="OmniLight3D" parent="lamppost_furn"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.471, 2.92497, 0)
visible = false
light_color = Color(0.900353, 0.606455, 0.0980959, 1)
light_energy = 10.0
omni_range = 10.6869

View File

@ -0,0 +1,95 @@
[gd_scene load_steps=6 format=3 uid="uid://c5tn7kpcn50eq"]
[ext_resource type="Script" uid="uid://cjiuw6wud2e3m" path="res://src/scripts/ui/damage_number.gd" id="1_jlpni"]
[ext_resource type="FontFile" uid="uid://xseb06nenn48" path="res://assets/fonts/Candara.ttf" id="2_jlpni"]
[sub_resource type="Animation" id="Animation_tq4yw"]
resource_name = "Dissapear"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Label3D:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5),
"transitions": PackedFloat32Array(0.5, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 0.5, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Label3D:scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.4, 1),
"transitions": PackedFloat32Array(-2, 1),
"update": 0,
"values": [Vector3(1, 1, 1), Vector3(0, 0, 0)]
}
tracks/2/type = "method"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(1),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"queue_free"
}]
}
[sub_resource type="Animation" id="Animation_jlpni"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Label3D:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Label3D:scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(1, 1, 1)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_a2dkg"]
_data = {
&"Dissapear": SubResource("Animation_tq4yw"),
&"RESET": SubResource("Animation_jlpni")
}
[node name="DamageNumber" type="Node3D"]
script = ExtResource("1_jlpni")
[node name="Label3D" type="Label3D" parent="."]
billboard = 1
no_depth_test = true
text = "25"
font = ExtResource("2_jlpni")
font_size = 64
outline_size = 8
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_a2dkg")
}
autoplay = "Dissapear"

View File

@ -0,0 +1,8 @@
extends Node3D
const DAMAGE_NUMBER = preload("res://src/scenes/ui/damage_number.tscn")
func spawn_damage_number(damage: int, position_in: Vector3, is_critical: bool) -> void:
var number = DAMAGE_NUMBER.instantiate()
number.setup(damage, position_in, is_critical)
add_child(number)

View File

@ -0,0 +1 @@
uid://cfrxuprulebec

View File

@ -1,9 +1,10 @@
extends Node
class_name HealthComponent
class_name HealthComponent extends Node
signal defeat()
signal health_changed()
@export var body: PhysicsBody3D
var max_health: float
var current_health: float:
set(value):
@ -20,5 +21,5 @@ func take_damage(damage_in: float, is_critical: bool) -> void:
var damage = damage_in
if is_critical:
damage *= 2.0
print("Is critical hit")
current_health -= damage
VFXManager.spawn_damage_number(damage, body.global_position, is_critical)

View File

@ -0,0 +1,15 @@
extends Node3D
@onready var label: Label3D = $Label3D
func setup(damage: int, position_in: Vector3, is_critical: bool) -> void:
if not is_inside_tree():
await ready
var color = Color.GOLD
if is_critical:
color = Color.RED
label.text = "-" + str(damage)
label.modulate = color
global_position = position_in

View File

@ -0,0 +1 @@
uid://cjiuw6wud2e3m