diff --git a/resources/levels/test_level_for_execution.tres b/resources/levels/test_level_for_execution.tres index b086da1..c9a9799 100644 --- a/resources/levels/test_level_for_execution.tres +++ b/resources/levels/test_level_for_execution.tres @@ -1,4 +1,4 @@ -[gd_resource type="Resource" script_class="AdventureLevelResource" load_steps=32 format=3 uid="uid://br3364jty1j0i"] +[gd_resource type="Resource" script_class="AdventureLevelResource" load_steps=36 format=3 uid="uid://br3364jty1j0i"] [ext_resource type="Script" uid="uid://bximdujbkj2n4" path="res://addons/pvzadventure/AdventureLevelResource.cs" id="1_qb1ge"] [ext_resource type="Script" uid="uid://cw7yc3i2lgcja" path="res://addons/pvzadventure/WaveEvent.cs" id="2_8aewt"] @@ -26,13 +26,9 @@ isHugeWave = false script = ExtResource("4_8miqm") zombies = Array[ExtResource("5_8miqm")]([null, ExtResource("8_ulhin"), null, ExtResource("8_ulhin"), null]) -[sub_resource type="Resource" id="Resource_3hvjc"] -script = ExtResource("4_8miqm") -zombies = Array[ExtResource("5_8miqm")]([null, null, null, null, null]) - [sub_resource type="Resource" id="Resource_hlq35"] script = ExtResource("3_hlq35") -zombiesOrdered = Array[ExtResource("4_8miqm")]([SubResource("Resource_8h2xm"), SubResource("Resource_3hvjc")]) +zombiesOrdered = Array[ExtResource("4_8miqm")]([SubResource("Resource_8h2xm")]) events = Array[ExtResource("2_8aewt")]([]) customWaveDelay = 0.0 isHugeWave = false @@ -48,20 +44,28 @@ events = Array[ExtResource("2_8aewt")]([]) customWaveDelay = 0.0 isHugeWave = true +[sub_resource type="Resource" id="Resource_3hvjc"] +script = ExtResource("4_8miqm") +zombies = Array[ExtResource("5_8miqm")]([null, null, ExtResource("7_yvl2y"), ExtResource("7_yvl2y"), null]) + +[sub_resource type="Resource" id="Resource_3h7h3"] +script = ExtResource("4_8miqm") +zombies = Array[ExtResource("5_8miqm")]([ExtResource("7_yvl2y"), null, ExtResource("7_yvl2y"), null, null]) + [sub_resource type="Resource" id="Resource_s62qb"] script = ExtResource("3_hlq35") -zombiesOrdered = Array[ExtResource("4_8miqm")]([]) +zombiesOrdered = Array[ExtResource("4_8miqm")]([SubResource("Resource_3hvjc"), SubResource("Resource_3h7h3")]) events = Array[ExtResource("2_8aewt")]([]) customWaveDelay = 0.0 isHugeWave = false [sub_resource type="Resource" id="Resource_ntuje"] script = ExtResource("4_8miqm") -zombies = Array[ExtResource("5_8miqm")]([null, null, ExtResource("8_ulhin"), null, null]) +zombies = Array[ExtResource("5_8miqm")]([null, null, ExtResource("8_ulhin"), null, ExtResource("7_yvl2y")]) [sub_resource type="Resource" id="Resource_psuap"] script = ExtResource("4_8miqm") -zombies = Array[ExtResource("5_8miqm")]([null, ExtResource("8_ulhin"), null, null, null]) +zombies = Array[ExtResource("5_8miqm")]([null, ExtResource("8_ulhin"), null, ExtResource("7_yvl2y"), null]) [sub_resource type="Resource" id="Resource_yvl2y"] script = ExtResource("3_hlq35") @@ -91,11 +95,15 @@ isHugeWave = false [sub_resource type="Resource" id="Resource_ipg75"] script = ExtResource("4_8miqm") +zombies = Array[ExtResource("5_8miqm")]([null, ExtResource("8_ulhin"), null, ExtResource("8_ulhin"), null]) + +[sub_resource type="Resource" id="Resource_4vq7k"] +script = ExtResource("4_8miqm") zombies = Array[ExtResource("5_8miqm")]([null, null, ExtResource("9_ulhin"), null, null]) [sub_resource type="Resource" id="Resource_cafd0"] script = ExtResource("3_hlq35") -zombiesOrdered = Array[ExtResource("4_8miqm")]([SubResource("Resource_ipg75")]) +zombiesOrdered = Array[ExtResource("4_8miqm")]([SubResource("Resource_ipg75"), SubResource("Resource_4vq7k")]) events = Array[ExtResource("2_8aewt")]([]) customWaveDelay = 0.0 isHugeWave = true @@ -115,9 +123,17 @@ isHugeWave = false script = ExtResource("4_8miqm") zombies = Array[ExtResource("5_8miqm")]([ExtResource("10_cafd0"), ExtResource("8_ulhin"), ExtResource("6_s62qb"), ExtResource("7_yvl2y"), ExtResource("9_ulhin")]) +[sub_resource type="Resource" id="Resource_y4q8x"] +script = ExtResource("4_8miqm") +zombies = Array[ExtResource("5_8miqm")]([ExtResource("7_yvl2y"), ExtResource("7_yvl2y"), ExtResource("8_ulhin"), ExtResource("8_ulhin"), null]) + +[sub_resource type="Resource" id="Resource_71fmc"] +script = ExtResource("4_8miqm") +zombies = Array[ExtResource("5_8miqm")]([ExtResource("9_ulhin"), ExtResource("8_ulhin"), ExtResource("8_ulhin"), null, null]) + [sub_resource type="Resource" id="Resource_dbrq5"] script = ExtResource("3_hlq35") -zombiesOrdered = Array[ExtResource("4_8miqm")]([SubResource("Resource_6i5yw")]) +zombiesOrdered = Array[ExtResource("4_8miqm")]([SubResource("Resource_6i5yw"), SubResource("Resource_y4q8x"), SubResource("Resource_71fmc")]) events = Array[ExtResource("2_8aewt")]([]) customWaveDelay = 0.0 isHugeWave = true diff --git a/scenes/entities/Zombies/cone_zombie.tscn b/scenes/entities/Zombies/cone_zombie.tscn index 0e047e3..826ce74 100644 --- a/scenes/entities/Zombies/cone_zombie.tscn +++ b/scenes/entities/Zombies/cone_zombie.tscn @@ -41,44 +41,44 @@ _armor = NodePath("Armor") material = SubResource("ShaderMaterial_sat5k") [node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"] -scale = Vector2(0.999832, 0.999832) +scale = Vector2(0.999833, 0.999833) [node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"] -scale = Vector2(0.999835, 0.999835) +scale = Vector2(0.999834, 0.999834) [node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] -scale = Vector2(0.999836, 0.999836) +scale = Vector2(0.999834, 0.999834) [node name="LeftUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="2"] scale = Vector2(0.999834, 0.999834) [node name="LeftLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="1"] -scale = Vector2(0.999836, 0.999836) +scale = Vector2(0.999834, 0.999834) [node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] -scale = Vector2(0.999828, 0.999828) +scale = Vector2(0.999829, 0.999829) [node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"] scale = Vector2(0.999829, 0.999829) [node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"] -scale = Vector2(0.99983, 0.99983) +scale = Vector2(0.999829, 0.999829) [node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] -scale = Vector2(0.99983, 0.99983) - -[node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"] -scale = Vector2(0.99983, 0.99983) - -[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] -rotation = -0.146474 -skew = -9.9659e-05 - -[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3"] scale = Vector2(0.999827, 0.999827) +[node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"] +scale = Vector2(0.999829, 0.999829) + +[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] +rotation = -0.0303385 +skew = -0.000100613 + +[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3"] +scale = Vector2(0.999828, 0.999828) + [node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"] -position = Vector2(-16, -7.99999) +position = Vector2(-16, -8) scale = Vector2(1, 1) [node name="Left_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="1"] @@ -86,12 +86,12 @@ position = Vector2(-4, -9) scale = Vector2(1, 1) [node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"] -position = Vector2(-2.8181, 2.56097) -rotation = -0.102313 -scale = Vector2(0.999828, 0.999828) +position = Vector2(-2.96232, 2.90907) +rotation = -0.0211916 +scale = Vector2(0.999829, 0.999829) [node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] -scale = Vector2(0.999828, 0.999828) +scale = Vector2(0.999829, 0.999829) [node name="Hat" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="4" node_paths=PackedStringArray("data")] position = Vector2(-2.5, -13.5) @@ -124,34 +124,35 @@ shape = SubResource("CircleShape2D_67t4t") scale = Vector2(0.999827, 0.999827) [node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"] -rotation = -0.15525 +rotation = -0.0321562 scale = Vector2(1, 1) [node name="Left_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm" index="0"] -position = Vector2(-0.999828, 12.9978) -rotation = -0.127972 -scale = Vector2(0.999657, 0.999657) +position = Vector2(-0.99983, 12.9978) +rotation = -0.0265063 +scale = Vector2(0.999658, 0.999658) [node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"] -scale = Vector2(0.99983, 0.99983) +scale = Vector2(0.999831, 0.999831) [node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"] -scale = Vector2(0.999827, 0.999827) +scale = Vector2(0.999828, 0.999828) [node name="Eatbox" parent="." index="2"] _damage = SubResource("Resource_011r0") [node name="Mover" parent="." index="4"] _speed = SubResource("Resource_b6mal") -_speedControlMult = 0.899509 +_speedControlMult = 0.0 + +[node name="HitPlayer" parent="." index="5"] +playlist = Array[AudioStream]([ExtResource("7_0amn8"), ExtResource("7_67t4t")]) +channels = Array[String](["plastic_hit", "hit"]) [node name="Armor" type="Node" parent="." index="6"] script = ExtResource("3_5s7in") MaxHP = 135.0 -[node name="HitPlayer" parent="." index="7"] -playlist = Array[AudioStream]([ExtResource("7_0amn8"), ExtResource("7_67t4t")]) -channels = Array[String](["plastic_hit", "hit"]) - +[connection signal="ArmorDamaged" from="Armor" to="." method="HPChangedMixedInvoker"] [connection signal="ArmorLost" from="Armor" to="HitPlayer" method="Next"] [connection signal="ArmorLost" from="Armor" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Hat" method="FallOff"] diff --git a/scenes/entities/Zombies/hobo.tscn b/scenes/entities/Zombies/hobo.tscn index 3eb6cf7..7dfe83a 100644 --- a/scenes/entities/Zombies/hobo.tscn +++ b/scenes/entities/Zombies/hobo.tscn @@ -769,16 +769,16 @@ scale = Vector2(0.999902, 0.999902) texture = SubResource("AtlasTexture_txjqc") [node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"] -scale = Vector2(0.99983, 0.99983) +scale = Vector2(0.999828, 0.999828) [node name="Right_Upper_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="0"] texture = SubResource("AtlasTexture_b583s") [node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"] -scale = Vector2(0.999829, 0.999829) +scale = Vector2(0.99983, 0.99983) [node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] -scale = Vector2(0.999827, 0.999827) +scale = Vector2(0.999828, 0.999828) [node name="Right_Foot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot" index="0"] texture = SubResource("AtlasTexture_uoit3") @@ -799,7 +799,7 @@ scale = Vector2(0.999831, 0.999831) texture = SubResource("AtlasTexture_nlwsb") [node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] -scale = Vector2(0.999817, 0.999817) +scale = Vector2(0.999816, 0.999816) [node name="Left_Foot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot" index="0"] texture = SubResource("AtlasTexture_8y6c0") @@ -808,16 +808,13 @@ texture = SubResource("AtlasTexture_8y6c0") scale = Vector2(0.999826, 0.999826) [node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"] -scale = Vector2(0.999828, 0.999828) +scale = Vector2(0.999829, 0.999829) [node name="Right_Upper_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="0"] texture = SubResource("AtlasTexture_nc6p3") [node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] -scale = Vector2(0.999818, 0.999818) - -[node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"] -scale = Vector2(0.999828, 0.999828) +scale = Vector2(0.999816, 0.999816) [node name="Right_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand" index="0"] texture = SubResource("AtlasTexture_y0p2l") @@ -829,7 +826,7 @@ texture = SubResource("AtlasTexture_op0h6") texture = SubResource("AtlasTexture_0s5wm") [node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] -rotation = 0.00923548 +rotation = 0.050955 scale = Vector2(1e-05, 1e-05) [node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Tie" index="0"] @@ -880,8 +877,8 @@ scale = Vector2(1, 1) [node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"] position = Vector2(-3, 3) -rotation = -0.0150209 -scale = Vector2(0.999828, 0.999828) +rotation = -0.082875 +scale = Vector2(0.999827, 0.999827) texture = SubResource("AtlasTexture_7cvmi") offset = Vector2(-14, -2) @@ -912,7 +909,7 @@ _threshold = 0.333 _observedArmor = NodePath("../../../../../../../../../../CanArmor") [node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] -scale = Vector2(0.999828, 0.999828) +scale = Vector2(0.999827, 0.999827) [node name="TrashcanLid" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="4"] position = Vector2(-0.0022974, -17.0131) @@ -927,19 +924,19 @@ editor_settings/show_bone_gizmo = false remote_path = NodePath("../../HeadParticle/Head/TrashcanLid/Trashcan_lid") [node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="5"] -scale = Vector2(0.999826, 0.999826) +scale = Vector2(0.999828, 0.999828) [node name="Left_Upper_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="0"] texture = SubResource("AtlasTexture_tebih") [node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"] -rotation = 0.00833116 +rotation = 0.0459656 scale = Vector2(0.999997, 0.999997) texture = SubResource("AtlasTexture_auxav") [node name="Left_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm" index="0"] position = Vector2(-0.99983, 12.9978) -rotation = -9.31647e-10 +rotation = -3.72659e-09 scale = Vector2(0.999652, 0.999652) texture = SubResource("AtlasTexture_dntsa") @@ -967,7 +964,7 @@ advance_expression_base_node = NodePath("../Behaviour") _speed = SubResource("Resource_4248q") _speedControlMult = 0.0 -[node name="HitPlayer" parent="." index="6"] +[node name="HitPlayer" parent="." index="5"] playlist = Array[AudioStream]([ExtResource("8_4248q"), ExtResource("9_tu6af")]) channels = Array[String](["metal_hit", "hit"]) @@ -989,6 +986,7 @@ metadata/_custom_type_script = "uid://c36bj8u7jghc7" [connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid" method="FallOff"] [connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/TrashcanLid/RemoteTransform2D" method="queue_free"] +[connection signal="ArmorDamaged" from="CanArmor" to="." method="HPChangedMixedInvoker"] [connection signal="ArmorLost" from="CanArmor" to="HitPlayer" method="Next"] [connection signal="ArmorLost" from="CanArmor" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Can" method="FallOff"] [connection signal="ArmorLost" from="CanArmor" to="Behaviour" method="Trashed"] diff --git a/scenes/entities/Zombies/zombie.tscn b/scenes/entities/Zombies/zombie.tscn index c34c110..c749122 100644 --- a/scenes/entities/Zombies/zombie.tscn +++ b/scenes/entities/Zombies/zombie.tscn @@ -821,7 +821,7 @@ metadata/_edit_lock_ = true [node name="RightUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] use_parent_material = true position = Vector2(-6, 3) -scale = Vector2(0.999831, 0.999831) +scale = Vector2(0.999833, 0.999833) rest = Transform2D(1, 0, 0, 1, -6, 3) editor_settings/show_bone_gizmo = false @@ -833,13 +833,13 @@ metadata/_edit_lock_ = true [node name="RightLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg"] position = Vector2(-2, 12) -scale = Vector2(0.999832, 0.999832) +scale = Vector2(0.999833, 0.999833) rest = Transform2D(1, 0, 0, 1, -2, 12) editor_settings/show_bone_gizmo = false [node name="RightFoot" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg"] position = Vector2(-2, 14) -scale = Vector2(0.999834, 0.999834) +scale = Vector2(0.99983, 0.99983) rest = Transform2D(1, 0, 0, 1, -2, 14) auto_calculate_length_and_angle = false length = 12.0 @@ -886,7 +886,7 @@ metadata/_edit_lock_ = true [node name="LeftFoot" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg"] position = Vector2(6, 10) -scale = Vector2(0.999831, 0.999831) +scale = Vector2(0.999829, 0.999829) rest = Transform2D(1, 0, 0, 1, 6, 10) auto_calculate_length_and_angle = false length = 12.0 @@ -902,7 +902,7 @@ metadata/_edit_lock_ = true [node name="Body" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] use_parent_material = true position = Vector2(1, -2) -scale = Vector2(0.999833, 0.999833) +scale = Vector2(0.999828, 0.999828) rest = Transform2D(1, 0, 0, 1, 1, -2) editor_settings/show_bone_gizmo = false @@ -928,7 +928,7 @@ editor_settings/show_bone_gizmo = false [node name="RightHand" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm"] position = Vector2(-1, 13) -scale = Vector2(0.999828, 0.999828) +scale = Vector2(0.999827, 0.999827) rest = Transform2D(1, 0, 0, 1, -1, 13) auto_calculate_length_and_angle = false length = 8.0 @@ -955,10 +955,9 @@ offset = Vector2(-15, -27) metadata/_edit_lock_ = true [node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] -visible = false position = Vector2(-9, -21) -rotation = 0.137587 -skew = -0.000422955 +rotation = -0.0192003 +skew = -0.000424743 rest = Transform2D(1, 0, 0, 1, -9, -21) auto_calculate_length_and_angle = false length = 24.0 @@ -973,7 +972,7 @@ metadata/_edit_lock_ = true [node name="Head" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] position = Vector2(-10, -25) -scale = Vector2(0.999826, 0.999826) +scale = Vector2(0.999829, 0.999829) rest = Transform2D(1, 0, 0, 1, -10, -25) editor_settings/show_bone_gizmo = false @@ -996,6 +995,7 @@ metadata/_edit_lock_ = true [node name="Right_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"] position = Vector2(-16, -8) +scale = Vector2(1, 1) texture = SubResource("AtlasTexture_vcc72") centered = false offset = Vector2(-2, -2) @@ -1003,15 +1003,16 @@ metadata/_edit_lock_ = true [node name="Left_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"] position = Vector2(-4, -9) +scale = Vector2(1, 1) texture = SubResource("AtlasTexture_kto0i") centered = false offset = Vector2(-2, -2) metadata/_edit_lock_ = true [node name="Jaw" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"] -position = Vector2(-3.00169, 2.99714) -rotation = 0.0133523 -scale = Vector2(0.999828, 0.999828) +position = Vector2(-2.70063, 2.27667) +rotation = 0.0268959 +scale = Vector2(0.999829, 0.999829) texture = SubResource("AtlasTexture_x5uj2") centered = false offset = Vector2(-12, -2) @@ -1028,7 +1029,7 @@ _observedEntity = NodePath("../../../../../../../..") [node name="Jaw" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] position = Vector2(-3, 3) -scale = Vector2(0.999828, 0.999828) +scale = Vector2(0.999829, 0.999829) rest = Transform2D(1, 0, 0, 1, -3, 3) auto_calculate_length_and_angle = false length = 11.0 @@ -1062,7 +1063,7 @@ remote_path = NodePath("../../HeadParticle/Head/Left_Eye") [node name="LeftUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] position = Vector2(-1, -20) -scale = Vector2(0.999832, 0.999832) +scale = Vector2(0.99983, 0.99983) rest = Transform2D(1, 0, 0, 1, -1, -20) editor_settings/show_bone_gizmo = false @@ -1084,7 +1085,7 @@ minTorque = -45.0 maxTorque = 45.0 [node name="Left_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"] -rotation = 0.129362 +rotation = 0.111148 scale = Vector2(0.999996, 0.999996) texture = SubResource("AtlasTexture_auqeq") centered = false @@ -1094,8 +1095,8 @@ metadata/_edit_lock_ = true [node name="Left_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm"] show_behind_parent = true position = Vector2(-0.99983, 12.9978) -rotation = -0.0570923 -scale = Vector2(0.999654, 0.999654) +rotation = -0.115002 +scale = Vector2(0.999657, 0.999657) texture = SubResource("AtlasTexture_vlvtp") centered = false offset = Vector2(-4, -1) @@ -1117,7 +1118,7 @@ editor_settings/show_bone_gizmo = false [node name="LeftHand" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm"] position = Vector2(-1, 13) -scale = Vector2(0.999824, 0.999824) +scale = Vector2(0.999827, 0.999827) rest = Transform2D(1, 0, 0, 1, -1, 13) auto_calculate_length_and_angle = false length = 6.0 @@ -1167,7 +1168,7 @@ entity = NodePath("..") [node name="Mover" type="Node" parent="."] script = ExtResource("4_u5syx") _speed = SubResource("Resource_ckb7n") -_speedControlMult = 0.954599 +_speedControlMult = 2.34115 [node name="HitPlayer" type="Node" parent="."] script = ExtResource("12_he8da") diff --git a/scenes/gui/flag.tscn b/scenes/gui/flag.tscn index fd63c61..5a72cfa 100644 --- a/scenes/gui/flag.tscn +++ b/scenes/gui/flag.tscn @@ -5,7 +5,6 @@ [node name="Flag" type="TextureRect"] show_behind_parent = true -anchors_preset = -1 offset_left = -7.0 offset_top = -22.0 offset_right = 13.0 diff --git a/scenes/templates/standard_players_house.tscn b/scenes/templates/standard_players_house.tscn index 07fbd15..64da0c4 100644 --- a/scenes/templates/standard_players_house.tscn +++ b/scenes/templates/standard_players_house.tscn @@ -47,6 +47,62 @@ tracks/2/keys = { "values": [2.0, 2.0, 1.0] } +[sub_resource type="Animation" id="Animation_lrlbv"] +resource_name = "FW_Sequence" +length = 3.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("GUI/ReadySetPlant:visible") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 3), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [true, false] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("GUI/ReadySetPlant:text") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": ["final_wave"] +} + +[sub_resource type="Animation" id="Animation_pqj5f"] +resource_name = "HW_Sequence" +length = 6.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("GUI/ReadySetPlant:text") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": ["huge_wave"] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("GUI/ReadySetPlant:visible") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 6), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [true, false] +} + [sub_resource type="Animation" id="Animation_8ajos"] resource_name = "PG_Sequence" length = 5.0 @@ -188,62 +244,6 @@ tracks/4/keys = { "values": [false] } -[sub_resource type="Animation" id="Animation_pqj5f"] -resource_name = "HW_Sequence" -length = 6.0 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("GUI/ReadySetPlant:text") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": ["huge_wave"] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("GUI/ReadySetPlant:visible") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0, 6), -"transitions": PackedFloat32Array(1, 1), -"update": 1, -"values": [true, false] -} - -[sub_resource type="Animation" id="Animation_lrlbv"] -resource_name = "FW_Sequence" -length = 3.0 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("GUI/ReadySetPlant:visible") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 3), -"transitions": PackedFloat32Array(1, 1), -"update": 1, -"values": [true, false] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("GUI/ReadySetPlant:text") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": ["final_wave"] -} - [sub_resource type="AnimationLibrary" id="AnimationLibrary_yw4uo"] _data = { &"CYS_Sequence": SubResource("Animation_vbgdr"), @@ -306,10 +306,11 @@ vertical_alignment = 1 [node name="CollisionShape2D" parent="GameOverZombie/LoseZone/Hitbox" index="0"] shape = SubResource("WorldBoundaryShape2D_vbgdr") -[node name="RowSpawner" type="Node2D" parent="." index="14" node_paths=PackedStringArray("delayTimer")] +[node name="RowSpawner" type="Node2D" parent="." index="14" node_paths=PackedStringArray("delayTimer", "runner")] position = Vector2(837, 76) script = ExtResource("4_kn7hc") delayTimer = NodePath("DelayTimer") +runner = NodePath("../LevelRunner") [node name="DelayTimer" type="Timer" parent="RowSpawner" index="0"] wait_time = 2.5 diff --git a/scripts/level/LevelRunner.cs b/scripts/level/LevelRunner.cs index 4c73000..814276a 100644 --- a/scripts/level/LevelRunner.cs +++ b/scripts/level/LevelRunner.cs @@ -1,4 +1,6 @@ using Godot; +using Newlon.Components.Zombies; +using System.Collections.Generic; namespace Newlon.Components.Level; @@ -8,6 +10,9 @@ public partial class LevelRunner : Node private AdventureLevelResource resource; private int waveIndex = -1; private bool hugeWaveApproaching = false; + public float waveHealth = 0; + public float waveHealthMax = 0; + public List zombies = []; [Export] private RowSpawner rowSpawner; [Export] private Timer waveTimer; [Export] private float approachNotificationTime; @@ -30,7 +35,7 @@ public partial class LevelRunner : Node hugeWaveApproaching = true; EmitSignal(SignalName.HugeWaveApproachingCallback); } - } + } public void SetLevelResource(AdventureLevelResource data) @@ -50,6 +55,8 @@ public partial class LevelRunner : Node if (resource.waves[waveIndex].isHugeWave) EmitSignal(SignalName.HugeWaveInitiated, waveIndex); rowSpawner.Add(resource.waves[waveIndex].zombiesOrdered); + ClearZombies(); + if (waveIndex == resource.waves.Count - 1) { EmitSignal(SignalName.FinalWaveInitiated); @@ -59,4 +66,42 @@ public partial class LevelRunner : Node waveTimer.WaitTime = resource.waves[waveIndex].customWaveDelay > 0 ? resource.waves[waveIndex].customWaveDelay : resource.standardWaveDelay; waveTimer.Start(); } + private void OnHPChanged(float delta) + { + if (waveIndex == resource.waves.Count - 1) return; + + waveHealth += delta; + if (waveHealth / waveHealthMax <= resource.wavePercentage) + { + if (resource.waves[waveIndex + 1].isHugeWave && waveTimer.TimeLeft > 6) + { + waveTimer.WaitTime = 6; + waveTimer.Start(); + ClearZombies(); + } + else + { + waveTimer.Stop(); + SummonWave(); + } + } + } + public void ClearZombies() + { + foreach (var zom in zombies) + { + if (zom != null) + { + zom.HPChangedMixed -= OnHPChanged; + } + } + + zombies.Clear(); + } + public void AddZombie(RuntimeZombieData zombie) + { + zombies.Add(zombie); + waveHealthMax += zombie.MaxHP; + zombie.HPChangedMixed += OnHPChanged; + } } diff --git a/scripts/level/zombe_spawners/RowSpawner.cs b/scripts/level/zombe_spawners/RowSpawner.cs index f9e6683..4c3ce40 100644 --- a/scripts/level/zombe_spawners/RowSpawner.cs +++ b/scripts/level/zombe_spawners/RowSpawner.cs @@ -10,11 +10,12 @@ public partial class RowSpawner : Node2D { private Queue queue = []; [Export] private Timer delayTimer; + [Export] private LevelRunner runner; public override void _Ready() - { + { delayTimer.Timeout += FormSquad; - } + } private void FormSquad() { @@ -37,6 +38,7 @@ public partial class RowSpawner : Node2D PoolContainer.Instance.Zombies.AddChild(zombie); zombie.GlobalPosition = new Vector2(GlobalPosition.X, Utility.LeftFieldBoundary.Y + lane * Utility.TileHeight); + runner.AddZombie(zombie); } public void Add(Array rowSpawns) diff --git a/scripts/zombies/RuntimeZombieData.cs b/scripts/zombies/RuntimeZombieData.cs index ae73b0b..61efcd7 100644 --- a/scripts/zombies/RuntimeZombieData.cs +++ b/scripts/zombies/RuntimeZombieData.cs @@ -7,13 +7,14 @@ public partial class RuntimeZombieData : Entity [Export] private Armor _armor; [Signal] public delegate void HasBeenKilledEventHandler(RuntimeZombieData who); + [Signal] public delegate void HPChangedMixedEventHandler(float delta); public bool AbleToEat = true; public override void _Ready() { base._Ready(); - + OnHPChanged += HPChangedMixedInvokerSource; LocalTimescale += (float)GD.RandRange(-0.05, 0.05); } @@ -48,6 +49,14 @@ public partial class RuntimeZombieData : Entity KillByDamage(); } } + public void HPChangedMixedInvokerSource(float delta, Node source) + { + EmitSignal(SignalName.HPChangedMixed, delta); + } + public void HPChangedMixedInvoker(float delta) + { + EmitSignal(SignalName.HPChangedMixed, delta); + } #region Death sequence private bool _killed = false; public override void KillByDamage() diff --git a/translations/gui.en.translation b/translations/gui.en.translation index 23b0fe9..1613f4b 100644 Binary files a/translations/gui.en.translation and b/translations/gui.en.translation differ diff --git a/translations/gui.ru.translation b/translations/gui.ru.translation index 48ad9ac..966f144 100644 Binary files a/translations/gui.ru.translation and b/translations/gui.ru.translation differ