From 2834806351a4529682e5286aaa5bb09e30135366 Mon Sep 17 00:00:00 2001 From: Zenny Date: Wed, 19 Mar 2025 02:10:38 -0700 Subject: [PATCH] Attempt to fix up boss shaders --- .../src/enemy/EnemyModelView3D.cs | 39 +++++++++-- Zennysoft.Game.Ma/src/enemy/defeated.res | Bin 640 -> 643 bytes .../14. horse_head/HorseFaceModelView.tscn | 65 +++++------------- .../animation/OxFaceAnimations.tres | 6 +- .../15. ox_face/OxFaceModelView.tscn | 59 ++++------------ Zennysoft.Game.Ma/src/enemy/take_damage.res | Bin 594 -> 595 bytes .../src/inventory_menu/InventoryMenu.cs | 4 +- 7 files changed, 73 insertions(+), 100 deletions(-) diff --git a/Zennysoft.Game.Ma/src/enemy/EnemyModelView3D.cs b/Zennysoft.Game.Ma/src/enemy/EnemyModelView3D.cs index bcecde02..8bab46d5 100644 --- a/Zennysoft.Game.Ma/src/enemy/EnemyModelView3D.cs +++ b/Zennysoft.Game.Ma/src/enemy/EnemyModelView3D.cs @@ -22,12 +22,12 @@ public partial class EnemyModelView3D : Node3D, IEnemyModelView [Node] private AnimationPlayer _animationPlayer { get; set; } = default!; - [Node] private AnimationPlayer _damagePlayer { get; set; } = default!; - [Node] public AnimationTree AnimationTree { get; set; } = default!; [Node] public IHitbox Hitbox { get; set; } = default!; + [Node] public MeshInstance3D MeshInstance { get; set; } = default!; + public void Setup() { } @@ -49,12 +49,18 @@ public partial class EnemyModelView3D : Node3D, IEnemyModelView public void PlayHitAnimation() { - _damagePlayer.Play(TAKE_DAMAGE); + var tweener = GetTree().CreateTween(); + ChangeMaterial(); + tweener.TweenMethod(Callable.From((float x) => SetTransparency(x)), 0.0f, 0.5f, 0.3f); + tweener.TweenCallback(Callable.From(ClearDamageEffect)); } public void PlayDeathAnimation() { - _damagePlayer.Play(DEFEATED); + LoadShader("res://src/enemy/EnemyDie.tres"); + var tweener = GetTree().CreateTween(); + tweener.TweenMethod(Callable.From((float x) => SetTransparency(x)), 0.0f, 1.0f, 0.8f); + tweener.TweenCallback(Callable.From(QueueFree)); } public void PlayWalkAnimation() @@ -66,4 +72,29 @@ public partial class EnemyModelView3D : Node3D, IEnemyModelView { AnimationTree.Get(PARAMETERS_PLAYBACK).As().Travel(IDLE); } + + private void ChangeMaterial() + { + var material = new StandardMaterial3D + { + AlbedoColor = Color.FromHsv(0, 1, 1, 1) + }; + MeshInstance.MaterialOverride = material; + } + + private void LoadShader(string shaderPath) + { + var shader = GD.Load(shaderPath); + MeshInstance.MaterialOverride = shader; + } + + private void ClearDamageEffect() + { + MeshInstance.MaterialOverride = null; + } + + private void SetTransparency(float transparencyAmount) + { + MeshInstance.Transparency = transparencyAmount; + } } diff --git a/Zennysoft.Game.Ma/src/enemy/defeated.res b/Zennysoft.Game.Ma/src/enemy/defeated.res index 2e001d77895e44a0e99856984892327c68e181a9..d3c632f997c3234fb6aaf26bab11fa99a1e4d021 100644 GIT binary patch delta 597 zcmV-b0;>Ih1%m~DQd2`i0ssI201yBGdj*k`AUG z%t2c$Fpd%+M5nlpG`(1~M3!*xy*IdhEw@Pr%oUf>P)qyofW$T$AhO91Eivc|kBadO&tTi<`ocR}q5H*n^j{3mdKlL;{Py6tHGcYK*@eH`F_ zgp0J;U@8?UVEoTGjIH%Gh~dA0{~MP-v$K?Y@^%=&*)qy4*e0p#|AEVGjW3IDk}*0? zr@(bjVSz8)HK*8<(-qyci>Wx5|1Ws8;IhgIm7A9-XZ`^pHdqP-&BqH8C`y>vjQCvc zl5Hj$pz1AuTxjuxAPOWuvAkvDH6=-sBuR>*D2k$}+KyEAfZ&q1p~pF`lC9&QaM?CT z`I@X6k^lu6P&6q2pIa=M2M!*Rkp>JNk&uf;0mw&!ZDo?092Y*c0h!NztuL5o{0I5( zVSsX~QekD~goPEG_lJP^TrOeTx*e8{{C_eXB3Q&3a1nc`aaA)TGg6qOkexB00vVyI zc@n_IB$Jf^Jb!AtUq1AWlySnx_n7r6{CH$+upz96w4BL7lStt&HT4yZ+BbU%)AFr_ z$`XsQF-Rr+ck<_XI3EXmhn|hv-Un)lb*CXhcIwGY8bDCCuC`dqr#0h2$s{bL$1{^k zrJFFw%hC)Dk=6NkL4T^612JyQ3it~Xe|X@bi~yD=tukx^B3T3YLb4ZA`9&LW$%J*F jCQ&SQv+M2fZfZ;F2`W-`RV{)5+Q-{}M5yEeQd2`iT6+~z delta 594 zcmV-Y0gN=QpmEs^Eid+%*-$jjX%a4gO?6sh4~IYeRrUEADD&D0E)8~V_X zSZl4NLI6JiNdUY|J@bFYmo?^9iIdaD+xq@%K7nLpS`?~(#DoOKUbi34e~m9wt&au# zm++4j9ZiMegp2=}!`ND1gBbn~_>YnK10&GS>=Sv{lCBiA23)-1P(_F5hg~E=!E!O zZjo&!8KCNaEnH~vgdhqb*Km2u#%oHFBuSDKMNt$*QMDhb%pt)gZ^MmyS|wYDqHx(Z zNBP>ys-Yz(oRj~SUoIO64=f=d4jNcKJTjLB9UKa_l}T!5TIr z0OeGr!pces3n@D9_wew!EW);RH!K7BZ`o*oQ1OBoMSG}mRWlKIe_FdwK9r3Z%>eKE!(qohcf<2Wc7VrXlj|%1KNbKu|NTY^nCA8t|Y57?#rGm`SBl znP^DMQVs>t)ro0Af2x`TF>cHX_zM$%c;KOo0G21UFgBSZGXr=bsTWh_;tX6gVFlC# g)XHv_dOEP14ia;yJX5PS5T_@+{YM;29#T_7L+GRoMgRZ+ diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/14. horse_head/HorseFaceModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/14. horse_head/HorseFaceModelView.tscn index b1fdcdb7..db93aa3c 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/14. horse_head/HorseFaceModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/14. horse_head/HorseFaceModelView.tscn @@ -1,12 +1,10 @@ -[gd_scene load_steps=39 format=4 uid="uid://bid6f48l0q58o"] +[gd_scene load_steps=35 format=4 uid="uid://bid6f48l0q58o"] [ext_resource type="Script" uid="uid://ckv5dmrw6pvn6" path="res://src/enemy/EnemyModelView3D.cs" id="1_q3bfl"] [ext_resource type="Texture2D" uid="uid://2e4cp477ex0t" path="res://src/enemy/enemy_types/14. horse_head/animation/Horse Head 1_Metal054C_1K-JPG_Color.jpg" id="1_vv6g0"] [ext_resource type="Animation" uid="uid://bhsp32c05j2o5" path="res://src/enemy/enemy_types/14. horse_head/animation/walking.res" id="2_yvw71"] [ext_resource type="Animation" uid="uid://ccq41qrm1lduk" path="res://src/enemy/enemy_types/14. horse_head/animation/walking2.res" id="3_bkc4x"] [ext_resource type="Script" uid="uid://6edayafleq8y" path="res://src/hitbox/Hitbox.cs" id="4_bkc4x"] -[ext_resource type="Animation" uid="uid://cttdq1c2wjrs6" path="res://src/enemy/take_damage.res" id="6_0er43"] -[ext_resource type="Animation" uid="uid://2vqtvhbhe0ba" path="res://src/enemy/defeated.res" id="7_i2g67"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tv6dm"] resource_name = "Material" @@ -166,7 +164,7 @@ length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("Armature/Skeleton3D/Cube_035:material_override") +tracks/0/path = NodePath("Armature/Skeleton3D/MeshInstance:material_override") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { @@ -178,7 +176,7 @@ tracks/0/keys = { tracks/1/type = "value" tracks/1/imported = false tracks/1/enabled = true -tracks/1/path = NodePath("Armature/Skeleton3D/Cube_035:transparency") +tracks/1/path = NodePath("Armature/Skeleton3D/MeshInstance:transparency") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { @@ -904,28 +902,6 @@ _data = { &"walk": ExtResource("3_bkc4x") } -[sub_resource type="Animation" id="Animation_i5d3v"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Armature/Skeleton3D/Cube_035:material_override") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [null] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_q73y1"] -_data = { -&"RESET": SubResource("Animation_i5d3v"), -&"defeated": ExtResource("7_i2g67"), -&"take_damage": ExtResource("6_0er43") -} - [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_b3lw2"] animation = &"attack_walk" @@ -998,7 +974,7 @@ bones/0/name = "spine1" bones/0/parent = -1 bones/0/rest = Transform3D(1.49012e-06, 0.00846654, -0.999964, 2.93367e-08, 0.999964, 0.00846654, 1, -4.23752e-08, 1.49012e-06, 0.000155807, -0.00105953, -2.01735) bones/0/enabled = true -bones/0/position = Vector3(0.0996386, -0.425489, -1.53144) +bones/0/position = Vector3(0.0996386, -0.42125, -1.53144) bones/0/rotation = Quaternion(0.0256267, -0.805691, 0.0118477, 0.591662) bones/0/scale = Vector3(1, 1, 1) bones/1/name = "spine0" @@ -1027,7 +1003,7 @@ bones/4/parent = 3 bones/4/rest = Transform3D(0.901905, -0.410135, 0.135488, 0.412416, 0.910915, 0.0120912, -0.128377, 0.0449723, 0.990705, 2.5332e-07, 0.990515, -7.07805e-08) bones/4/enabled = true bones/4/position = Vector3(2.5332e-07, 0.990515, -7.07805e-08) -bones/4/rotation = Quaternion(-0.00553085, 0.0595498, 0.184892, 0.980937) +bones/4/rotation = Quaternion(-0.00514174, 0.0597764, 0.185619, 0.980788) bones/4/scale = Vector3(1, 1, 1) bones/5/name = "neck4" bones/5/parent = 4 @@ -1041,7 +1017,7 @@ bones/6/parent = 5 bones/6/rest = Transform3D(0.0598389, 0.98531, 0.15995, -0.975271, 0.0235553, 0.219755, 0.212759, -0.169144, 0.962353, 3.65078e-07, 1.40318, 0) bones/6/enabled = true bones/6/position = Vector3(3.65078e-07, 1.40318, 0) -bones/6/rotation = Quaternion(-0.328118, 0.0506861, -0.452772, 0.827506) +bones/6/rotation = Quaternion(-0.328564, 0.0507293, -0.45401, 0.826648) bones/6/scale = Vector3(1, 1, 1) bones/7/name = "Bone.007" bones/7/parent = 6 @@ -1076,7 +1052,7 @@ bones/11/parent = 1 bones/11/rest = Transform3D(0.981457, 0.0769315, -0.175568, 0.18837, -0.217537, 0.957703, 0.035485, -0.973015, -0.227995, -1.09896e-07, 3.84743, -2.10479e-07) bones/11/enabled = true bones/11/position = Vector3(-1.09896e-07, 3.84743, -2.10479e-07) -bones/11/rotation = Quaternion(-0.813964, -0.0945, -0.0238288, 0.572682) +bones/11/rotation = Quaternion(-0.81374, -0.0940717, -0.0238191, 0.573071) bones/11/scale = Vector3(1, 1, 1) bones/12/name = "arm2_L" bones/12/parent = 11 @@ -1103,7 +1079,7 @@ bones/15/name = "arm1_R" bones/15/parent = 1 bones/15/rest = Transform3D(-0.98213, 0.0512573, -0.181089, -0.187541, -0.185921, 0.964501, 0.0157694, 0.981227, 0.192212, 0.00107862, 3.8461, -0.0821097) bones/15/enabled = true -bones/15/position = Vector3(-0.170691, 3.40553, 0.121909) +bones/15/position = Vector3(-0.171618, 3.41266, 0.120561) bones/15/rotation = Quaternion(-0.502686, 0.531044, 0.680821, -0.0422068) bones/15/scale = Vector3(1, 1, 1) bones/16/name = "arm2_R" @@ -1118,7 +1094,7 @@ bones/17/parent = 16 bones/17/rest = Transform3D(0.998789, 0.0488077, -0.00615137, -0.0491113, 0.996528, -0.0672226, 0.00284903, 0.0674433, 0.997719, -5.21541e-08, 3.04263, -1.31503e-06) bones/17/enabled = true bones/17/position = Vector3(-5.21541e-08, 3.04263, -1.31503e-06) -bones/17/rotation = Quaternion(-0.0100291, 0.0961115, 0.277396, 0.955884) +bones/17/rotation = Quaternion(-0.0110724, 0.0961496, 0.277039, 0.955972) bones/17/scale = Vector3(1, 1, 1) bones/18/name = "hand_R" bones/18/parent = 17 @@ -1131,7 +1107,7 @@ bones/19/name = "hip_L" bones/19/parent = -1 bones/19/rest = Transform3D(0.138486, 0.897208, 0.419333, -0.129033, -0.403458, 0.905854, 0.981923, -0.179556, 0.059896, 0.000155807, -0.00105953, -2.01735) bones/19/enabled = true -bones/19/position = Vector3(0.147751, -0.366737, -1.49267) +bones/19/position = Vector3(0.147751, -0.364284, -1.49267) bones/19/rotation = Quaternion(0.427793, 0.34021, 0.687061, -0.478745) bones/19/scale = Vector3(1, 1, 1) bones/20/name = "leg1_L" @@ -1139,14 +1115,14 @@ bones/20/parent = 19 bones/20/rest = Transform3D(0.945603, 0.113405, 0.304916, -0.324072, 0.410457, 0.852351, -0.0284943, -0.9048, 0.424881, 2.08616e-07, 2.00996, -7.1153e-07) bones/20/enabled = true bones/20/position = Vector3(2.08616e-07, 2.00996, -7.1153e-07) -bones/20/rotation = Quaternion(-0.433913, -0.330085, -0.375304, 0.749607) +bones/20/rotation = Quaternion(-0.433692, -0.330357, -0.375638, 0.749447) bones/20/scale = Vector3(1, 1, 1) bones/21/name = "leg2_L" bones/21/parent = 20 bones/21/rest = Transform3D(0.990336, -0.138679, 0.00180777, 0.138628, 0.990193, 0.0173138, -0.00419111, -0.0168959, 0.999848, 5.96046e-08, 5.85994, -5.23403e-07) bones/21/enabled = true bones/21/position = Vector3(5.96046e-08, 5.85994, -5.23403e-07) -bones/21/rotation = Quaternion(-0.0493778, 0.00187693, 0.394976, 0.917362) +bones/21/rotation = Quaternion(-0.0493245, 0.00187731, 0.39455, 0.917548) bones/21/scale = Vector3(1, 1, 1) bones/22/name = "foot1_L" bones/22/parent = 21 @@ -1180,7 +1156,7 @@ bones/26/name = "hip_R" bones/26/parent = -1 bones/26/rest = Transform3D(0.138486, -0.897208, -0.419333, 0.129033, -0.403458, 0.905854, -0.981923, -0.179556, 0.059896, -0.000155807, -0.00105953, -2.01735) bones/26/enabled = true -bones/26/position = Vector3(0.0289172, -0.354449, -1.59603) +bones/26/position = Vector3(0.0289172, -0.352813, -1.59603) bones/26/rotation = Quaternion(0.695067, -0.09936, -0.377924, -0.603475) bones/26/scale = Vector3(1, 1, 1) bones/27/name = "leg1_R" @@ -1188,14 +1164,14 @@ bones/27/parent = 26 bones/27/rest = Transform3D(0.945603, -0.113405, -0.304916, 0.324072, 0.410457, 0.852351, 0.0284943, -0.9048, 0.424881, -9.54606e-09, 2.00996, -3.52971e-07) bones/27/enabled = true bones/27/position = Vector3(-9.54606e-09, 2.00996, -3.52971e-07) -bones/27/rotation = Quaternion(-0.312194, 0.177893, 0.184271, 0.914841) +bones/27/rotation = Quaternion(-0.311405, 0.17846, 0.184318, 0.914989) bones/27/scale = Vector3(1, 1, 1) bones/28/name = "leg2_R" bones/28/parent = 27 bones/28/rest = Transform3D(0.990336, 0.138679, -0.00180777, -0.138628, 0.990193, 0.0173138, 0.00419111, -0.0168959, 0.999848, 4.51691e-08, 5.85994, -3.72529e-09) bones/28/enabled = true bones/28/position = Vector3(4.51691e-08, 5.85994, -3.72529e-09) -bones/28/rotation = Quaternion(-0.277924, 0.0201355, -0.181342, 0.943116) +bones/28/rotation = Quaternion(-0.277833, 0.0201363, -0.181282, 0.943154) bones/28/scale = Vector3(1, 1, 1) bones/29/name = "foot1_R" bones/29/parent = 28 @@ -1226,12 +1202,13 @@ bones/32/position = Vector3(-3.87024, -12.3974, -5.7547) bones/32/rotation = Quaternion(0.514417, 0.701671, -0.342235, -0.354835) bones/32/scale = Vector3(1, 1, 1) -[node name="Cube_035" type="MeshInstance3D" parent="Armature/Skeleton3D"] +[node name="MeshInstance" type="MeshInstance3D" parent="Armature/Skeleton3D"] +unique_name_in_owner = true mesh = SubResource("ArrayMesh_6e63x") skin = SubResource("Skin_yvw71") [node name="BoneAttachment3D" type="BoneAttachment3D" parent="Armature/Skeleton3D"] -transform = Transform3D(-0.370165, -0.13327, -0.919357, -0.301508, -0.918844, 0.254593, -0.878676, 0.371435, 0.299942, -2.00357, 8.72419, 6.32127) +transform = Transform3D(-0.370164, -0.13327, -0.919357, -0.300272, -0.919366, 0.254171, -0.879099, 0.370142, 0.300299, -2.00357, 8.72605, 6.31619) bone_name = "TOP OF SKULL" bone_idx = 8 @@ -1260,12 +1237,6 @@ libraries = { &"": SubResource("AnimationLibrary_h244y") } -[node name="DamagePlayer" type="AnimationPlayer" parent="."] -unique_name_in_owner = true -libraries = { -&"": SubResource("AnimationLibrary_q73y1") -} - [node name="AnimationTree" type="AnimationTree" parent="."] unique_name_in_owner = true root_node = NodePath("%AnimationTree/..") diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/14. horse_head/animation/OxFaceAnimations.tres b/Zennysoft.Game.Ma/src/enemy/enemy_types/14. horse_head/animation/OxFaceAnimations.tres index f55565ff..ae05c6c7 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/14. horse_head/animation/OxFaceAnimations.tres +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/14. horse_head/animation/OxFaceAnimations.tres @@ -31,7 +31,7 @@ tracks/1/keys = { tracks/2/type = "value" tracks/2/imported = false tracks/2/enabled = true -tracks/2/path = NodePath("Armature/Skeleton3D/Cube_035:material_override") +tracks/2/path = NodePath("Armature/Skeleton3D/MeshInstance:material_override") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { @@ -43,7 +43,7 @@ tracks/2/keys = { tracks/3/type = "value" tracks/3/imported = false tracks/3/enabled = true -tracks/3/path = NodePath("Armature/Skeleton3D/Cube_035:material_override:shader") +tracks/3/path = NodePath("Armature/Skeleton3D/MeshInstance:material_override:shader") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/keys = { @@ -55,7 +55,7 @@ tracks/3/keys = { tracks/4/type = "value" tracks/4/imported = false tracks/4/enabled = true -tracks/4/path = NodePath("Armature/Skeleton3D/Cube_035:transparency") +tracks/4/path = NodePath("Armature/Skeleton3D/MeshInstance:transparency") tracks/4/interp = 1 tracks/4/loop_wrap = true tracks/4/keys = { diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/15. ox_face/OxFaceModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/15. ox_face/OxFaceModelView.tscn index fb10b460..b9839d43 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/15. ox_face/OxFaceModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/15. ox_face/OxFaceModelView.tscn @@ -1,10 +1,8 @@ -[gd_scene load_steps=29 format=4 uid="uid://dnomfbym36ivg"] +[gd_scene load_steps=25 format=4 uid="uid://dnomfbym36ivg"] [ext_resource type="Script" uid="uid://ckv5dmrw6pvn6" path="res://src/enemy/EnemyModelView3D.cs" id="1_6miqu"] [ext_resource type="Texture2D" uid="uid://dp6hwvuhfkji8" path="res://src/enemy/enemy_types/15. ox_face/models/OX FACE_Metal054C_1K-JPG_Color.jpg" id="1_lsf8e"] [ext_resource type="AnimationLibrary" uid="uid://dn4501qsypsu" path="res://src/enemy/enemy_types/14. horse_head/animation/OxFaceAnimations.tres" id="3_pmgg3"] -[ext_resource type="Animation" uid="uid://2vqtvhbhe0ba" path="res://src/enemy/defeated.res" id="4_i5d3v"] -[ext_resource type="Animation" uid="uid://cttdq1c2wjrs6" path="res://src/enemy/take_damage.res" id="5_5s5ab"] [ext_resource type="Script" uid="uid://6edayafleq8y" path="res://src/hitbox/Hitbox.cs" id="5_f2iok"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_y7226"] @@ -136,28 +134,6 @@ bind/32/name = &"heelIK_R" bind/32/bone = -1 bind/32/pose = Transform3D(-0.16376, 0.9865, -2.58876e-07, 1.58082e-06, 2.84217e-14, -1, -0.9865, -0.16376, -1.55948e-06, 0.296279, -1.51158, -0.141545) -[sub_resource type="Animation" id="Animation_i5d3v"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Armature/Skeleton3D/Cube_035:material_override") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [null] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_q73y1"] -_data = { -&"RESET": SubResource("Animation_i5d3v"), -&"defeated": ExtResource("4_i5d3v"), -&"take_damage": ExtResource("5_5s5ab") -} - [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_pmgg3"] animation = &"idle" @@ -224,7 +200,7 @@ bones/0/name = "spine1" bones/0/parent = -1 bones/0/rest = Transform3D(1.49012e-06, 0.00846654, -0.999964, 2.93367e-08, 0.999964, 0.00846654, 1, -4.23752e-08, 1.49012e-06, 0.000155807, -0.00105953, -2.01735) bones/0/enabled = true -bones/0/position = Vector3(-0.259564, -0.972442, -1.97318) +bones/0/position = Vector3(-0.259475, -0.962423, -1.97386) bones/0/rotation = Quaternion(0.0915277, -0.692111, -0.0341586, 0.715149) bones/0/scale = Vector3(1, 1, 1) bones/1/name = "spine0" @@ -267,7 +243,7 @@ bones/6/parent = 5 bones/6/rest = Transform3D(0.0598389, 0.98531, 0.15995, -0.975271, 0.0235553, 0.219755, 0.212759, -0.169144, 0.962353, 3.65078e-07, 1.40318, 0) bones/6/enabled = true bones/6/position = Vector3(3.65078e-07, 1.40318, 0) -bones/6/rotation = Quaternion(-0.0716746, -0.303035, -0.74474, 0.590251) +bones/6/rotation = Quaternion(-0.070258, -0.302522, -0.74472, 0.590708) bones/6/scale = Vector3(1, 1, 1) bones/7/name = "Bone.007" bones/7/parent = 6 @@ -302,7 +278,7 @@ bones/11/parent = 1 bones/11/rest = Transform3D(0.981457, 0.0769315, -0.175568, 0.18837, -0.217537, 0.957703, 0.035485, -0.973015, -0.227995, -1.09896e-07, 3.84743, -2.10479e-07) bones/11/enabled = true bones/11/position = Vector3(-1.09896e-07, 3.84743, -2.10479e-07) -bones/11/rotation = Quaternion(-0.784227, -0.0612094, 0.07284, 0.613136) +bones/11/rotation = Quaternion(-0.784811, -0.0617262, 0.0716596, 0.612476) bones/11/scale = Vector3(1, 0.999999, 1) bones/12/name = "arm2_L" bones/12/parent = 11 @@ -330,7 +306,7 @@ bones/15/parent = 1 bones/15/rest = Transform3D(-0.98213, 0.0512573, -0.181089, -0.187541, -0.185921, 0.964501, 0.0157694, 0.981227, 0.192212, 0.00107862, 3.8461, -0.0821097) bones/15/enabled = true bones/15/position = Vector3(0.00107886, 3.8461, -0.0821095) -bones/15/rotation = Quaternion(-0.211143, 0.738616, 0.620847, -0.156251) +bones/15/rotation = Quaternion(-0.210594, 0.737756, 0.621763, -0.157408) bones/15/scale = Vector3(1, 1, 1) bones/16/name = "arm2_R" bones/16/parent = 15 @@ -357,22 +333,22 @@ bones/19/name = "hip_L" bones/19/parent = -1 bones/19/rest = Transform3D(0.138486, 0.897208, 0.419333, -0.129033, -0.403458, 0.905854, 0.981923, -0.179556, 0.059896, 0.000155807, -0.00105953, -2.01735) bones/19/enabled = true -bones/19/position = Vector3(-0.315969, -1.13837, -1.93232) -bones/19/rotation = Quaternion(0.614239, 0.309139, 0.567038, -0.453445) +bones/19/position = Vector3(-0.3079, -1.13073, -1.95891) +bones/19/rotation = Quaternion(0.612519, 0.311134, 0.569701, -0.451062) bones/19/scale = Vector3(1, 1, 1) bones/20/name = "leg1_L" bones/20/parent = 19 bones/20/rest = Transform3D(0.945603, 0.113405, 0.304916, -0.324072, 0.410457, 0.852351, -0.0284943, -0.9048, 0.424881, 2.08616e-07, 2.00996, -7.1153e-07) bones/20/enabled = true bones/20/position = Vector3(2.08616e-07, 2.00996, -7.1153e-07) -bones/20/rotation = Quaternion(-0.313761, -0.438388, -0.277392, 0.795251) +bones/20/rotation = Quaternion(-0.311987, -0.440304, -0.274463, 0.795906) bones/20/scale = Vector3(1, 0.999999, 1) bones/21/name = "leg2_L" bones/21/parent = 20 bones/21/rest = Transform3D(0.990336, -0.138679, 0.00180777, 0.138628, 0.990193, 0.0173138, -0.00419111, -0.0168959, 0.999848, 5.96046e-08, 5.85994, -5.23403e-07) bones/21/enabled = true bones/21/position = Vector3(5.96046e-08, 5.85994, -5.23403e-07) -bones/21/rotation = Quaternion(-0.0602172, 0.00130028, 0.48746, 0.871065) +bones/21/rotation = Quaternion(-0.0601665, 0.00130063, 0.48705, 0.871298) bones/21/scale = Vector3(1, 1, 1) bones/22/name = "foot1_L" bones/22/parent = 21 @@ -406,7 +382,7 @@ bones/26/name = "hip_R" bones/26/parent = -1 bones/26/rest = Transform3D(0.138486, -0.897208, -0.419333, 0.129033, -0.403458, 0.905854, -0.981923, -0.179556, 0.059896, -0.000155807, -0.00105953, -2.01735) bones/26/enabled = true -bones/26/position = Vector3(-0.214624, -1.11395, -2.01787) +bones/26/position = Vector3(-0.238342, -1.11395, -2.01771) bones/26/rotation = Quaternion(0.608697, -0.3155, -0.575514, -0.445793) bones/26/scale = Vector3(1, 1, 1) bones/27/name = "leg1_R" @@ -414,14 +390,14 @@ bones/27/parent = 26 bones/27/rest = Transform3D(0.945603, -0.113405, -0.304916, 0.324072, 0.410457, 0.852351, 0.0284943, -0.9048, 0.424881, -9.54606e-09, 2.00996, -3.52971e-07) bones/27/enabled = true bones/27/position = Vector3(-9.54606e-09, 2.00996, -3.52971e-07) -bones/27/rotation = Quaternion(-0.207107, 0.42198, 0.141476, 0.87122) +bones/27/rotation = Quaternion(-0.207804, 0.421596, 0.141956, 0.871162) bones/27/scale = Vector3(1, 0.999999, 1) bones/28/name = "leg2_R" bones/28/parent = 27 bones/28/rest = Transform3D(0.990336, 0.138679, -0.00180777, -0.138628, 0.990193, 0.0173138, 0.00419111, -0.0168959, 0.999848, 4.51691e-08, 5.85994, -3.72529e-09) bones/28/enabled = true bones/28/position = Vector3(4.51691e-08, 5.85994, -3.72529e-09) -bones/28/rotation = Quaternion(-0.0639166, -0.00115713, -0.510305, 0.857614) +bones/28/rotation = Quaternion(-0.0640625, -0.00115623, -0.51147, 0.856909) bones/28/scale = Vector3(1, 1, 1) bones/29/name = "foot1_R" bones/29/parent = 28 @@ -453,7 +429,7 @@ bones/32/rotation = Quaternion(0.456756, 0.539878, -0.539587, -0.456893) bones/32/scale = Vector3(1, 1, 1) [node name="BoneAttachment3D" type="BoneAttachment3D" parent="Armature/Skeleton3D"] -transform = Transform3D(-0.29397, -0.0792464, -0.952524, -0.329406, -0.927105, 0.178794, -0.897258, 0.366327, 0.246437, -1.66466, 8.29245, 4.94882) +transform = Transform3D(-0.292354, -0.0767198, -0.953228, -0.329701, -0.927578, 0.175774, -0.897678, 0.365669, 0.245886, -1.666, 8.30186, 4.94831) bone_name = "TOP OF SKULL" bone_idx = 8 @@ -464,7 +440,8 @@ light_energy = 15.248 light_indirect_energy = 5.14 omni_range = 4.628 -[node name="Cube_035" type="MeshInstance3D" parent="Armature/Skeleton3D"] +[node name="MeshInstance" type="MeshInstance3D" parent="Armature/Skeleton3D"] +unique_name_in_owner = true custom_aabb = AABB(0, 4.26, 1.65, 0, 2.215, 3.215) mesh = SubResource("ArrayMesh_5ew54") skin = SubResource("Skin_e330f") @@ -475,12 +452,6 @@ libraries = { &"": ExtResource("3_pmgg3") } -[node name="DamagePlayer" type="AnimationPlayer" parent="."] -unique_name_in_owner = true -libraries = { -&"": SubResource("AnimationLibrary_q73y1") -} - [node name="AnimationTree" type="AnimationTree" parent="."] unique_name_in_owner = true root_node = NodePath("%AnimationTree/..") diff --git a/Zennysoft.Game.Ma/src/enemy/take_damage.res b/Zennysoft.Game.Ma/src/enemy/take_damage.res index a375c6a1c19d18fe587b6aa74050f68e7436ebe5..da34293ee4ef1b1604ce94989cf974b3d17dd570 100644 GIT binary patch literal 595 zcmV-Z0<8T~Q$s@n000005C8!41ONa#0ssIgwJ-f(^8<|$0H&E%Jur`w4!{T^hJ}fO zf(kkexrNFP&`^3rB)Rt9B$*2VxlKBi(YxB#(s%8-)srX(;U}wrPX0j#n~^*4e+ohX zJpe@jxvi}2stQyt+iIuuzvH@IHa`v!>&gEE*HGcXR;Q8Xe}U^xozf2Y|KJ}wkO%=n z!o|aXjX&5rrS>xXC-6VO#vcwxE4O(yS^;OuCbwQwG1q^NM{WKO;L4z+B7_d=l&9|h zAbXY2+lovuG7z>ZXY9r}W zXDvGphLWFPykpzN&+|Ob^K3MVxg$ItSNkbA)ESvN5&4v9FN{))n|3AyCMX(|{}`DN z6)Q3+F1*+{(GmjE;Df;e5A9@ef^fc&to$S^Ei=M`CBj*y)(-x6aA^Gh_@7{MsgfCC zF<~IX1x8a+N~Sc*7NMXqX#tf$(Gp*%k-eFk8Bx#_6cn-?kOC2+Ivx^W)+`A!A{DBr zLP=68Y^?!xP|;=tKO4fOhW0oNC7CvM>{iSES9K<>NJ9 zVOQdNPRlDU)m4wSL)_#te9vbNK|jX-d-Q2l%%AX*N8)J)8%Isd;;Opd7MGD5omn_U ztu}?JzD+z*@<_NLHqXvztT3B?FT9-Btix)fg@z4@e{c-|a@q@N9P1(QJBgJkOPSLO hAgt0KmozcI_=B%E)KpVH5Pq@>=;R+{uo-zT`Yi=Q z06hRi0CGa*{(s=h8uOw=<+Sm(zW*ApAQGb1WZGm9fw9-E#Q9&~%Tw#)0skM|!v+x` zK1jfH_>XZITkC5O!+!$*16=-3$TOv-+>=*g0cXo5w_sCJ*Z+*m?fDbS(rqxH!p*+y6G!>RRoDmA6yv#pN4cApLzrQl0?DOQ-*5= g9&165p^CWb{iF@Q^6pnhAVTwjpJ`CIcv4eCLtqLNr~m)} diff --git a/Zennysoft.Game.Ma/src/inventory_menu/InventoryMenu.cs b/Zennysoft.Game.Ma/src/inventory_menu/InventoryMenu.cs index fb7aa19f..e4973e2b 100644 --- a/Zennysoft.Game.Ma/src/inventory_menu/InventoryMenu.cs +++ b/Zennysoft.Game.Ma/src/inventory_menu/InventoryMenu.cs @@ -91,8 +91,8 @@ public partial class InventoryMenu : Control, IInventoryMenu Player.Stats.CurrentExp.Sync += CurrentExp_Sync; Player.Stats.ExpToNextLevel.Sync += ExpToNextLevel_Sync; Player.Stats.CurrentLevel.Sync += CurrentLevel_Sync; - Player.Stats.BonusAttack.Changed += BonusAttack_Sync; - Player.Stats.BonusDefense.Changed += BonusDefense_Sync; + Player.Stats.BonusAttack.Sync += BonusAttack_Sync; + Player.Stats.BonusDefense.Sync += BonusDefense_Sync; SetProcessInput(false); }