diff --git a/addons/pvzadventure/.gitignore b/addons/pvzadventure/.gitignore new file mode 100644 index 0000000..6e25fa8 --- /dev/null +++ b/addons/pvzadventure/.gitignore @@ -0,0 +1 @@ +cache/ \ No newline at end of file diff --git a/addons/pvzadventure/AdventureLevelResource.cs b/addons/pvzadventure/AdventureLevelResource.cs index 7f712b4..ba5c57d 100644 --- a/addons/pvzadventure/AdventureLevelResource.cs +++ b/addons/pvzadventure/AdventureLevelResource.cs @@ -8,11 +8,17 @@ public partial class AdventureLevelResource : Resource { [Export] public int startSun = 50; //[Export] public Array conditions; + [ExportGroup("Wave properties")] [Export(PropertyHint.Range, "0,1,0.01")] public float wavePercentage; [Export] public float standardWaveDelay; [Export] public float initialWaveDelay; [Export] public RewardResource reward; - [Export] public Array forbiddenPlants; - [Export] public Array waves; + [ExportGroup("Editor-edited properties")] + [ExportSubgroup("Seedpackets")] + [Export] public Array forbiddenPlants = new(); + [Export] public Array forbiddenTags = new(); + [Export] public Array prepickedPlants = new(); + [ExportSubgroup("Waves")] + [Export] public Array waves = new(); [Export] public Array initialScenes = [.. new PackedScene[45]]; } diff --git a/addons/pvzadventure/PvZAdventure.cs b/addons/pvzadventure/PvZAdventure.cs index c996d1f..f7a87ee 100644 --- a/addons/pvzadventure/PvZAdventure.cs +++ b/addons/pvzadventure/PvZAdventure.cs @@ -4,7 +4,7 @@ using Godot; [Tool] public partial class PvZAdventure : EditorPlugin { - private PackedScene panel = ResourceLoader.Load("res://addons/pvzadventure/scenes/adventure_editor.tscn"); + private PackedScene panel = ResourceLoader.Load("uid://dkq82o31vr3i2"); private Control panelInstance; public override void _EnterTree() diff --git a/addons/pvzadventure/scenes/adventure_editor.tscn b/addons/pvzadventure/scenes/adventure-editor/adventure_editor.tscn similarity index 90% rename from addons/pvzadventure/scenes/adventure_editor.tscn rename to addons/pvzadventure/scenes/adventure-editor/adventure_editor.tscn index 00a3f0f..134f5b3 100644 --- a/addons/pvzadventure/scenes/adventure_editor.tscn +++ b/addons/pvzadventure/scenes/adventure-editor/adventure_editor.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=5 format=3 uid="uid://dkq82o31vr3i2"] -[ext_resource type="Script" uid="uid://dkgxtig5fwdgi" path="res://addons/pvzadventure/scripts/AdventureEditor.cs" id="1_go5yu"] +[ext_resource type="Script" uid="uid://dkgxtig5fwdgi" path="res://addons/pvzadventure/scripts/adventure-editor/AdventureEditor.cs" id="1_go5yu"] [ext_resource type="Script" uid="uid://binuuattefn7d" path="res://addons/pvzadventure/scripts/FileButton.cs" id="2_d5hwn"] [ext_resource type="Script" uid="uid://c6jttmpeyakoa" path="res://addons/pvzadventure/scripts/EditorsContainer.cs" id="3_5imrs"] -[ext_resource type="Script" uid="uid://b0hl4ap18wbb2" path="res://addons/pvzadventure/scripts/AdventureResourceInspector.cs" id="3_d5hwn"] +[ext_resource type="Script" uid="uid://b0hl4ap18wbb2" path="res://addons/pvzadventure/scripts/adventure-editor/AdventureResourceInspector.cs" id="3_d5hwn"] [node name="AdventureEditor" type="MarginContainer"] anchors_preset = 15 @@ -41,6 +41,11 @@ script = ExtResource("2_d5hwn") [node name="FileDialog" type="FileDialog" parent="Editor/StatusBar/HBoxContainer/FileButton"] +[node name="PlayButton" type="Button" parent="Editor/StatusBar/HBoxContainer"] +layout_mode = 2 +text = "Play" +flat = true + [node name="WorkArea" type="HSplitContainer" parent="Editor"] layout_mode = 2 size_flags_vertical = 3 @@ -79,6 +84,7 @@ text = "New" [connection signal="HardReloadRequested" from="." to="Editor/WorkArea/PanelContainer" method="ClearChildren"] [connection signal="ResourceChanged" from="." to="Editor/WorkArea/Inspector/ResourceInspector" method="Refresh"] +[connection signal="pressed" from="Editor/StatusBar/HBoxContainer/PlayButton" to="." method="Play"] [connection signal="Refreshed" from="Editor/WorkArea/Inspector/ResourceInspector" to="." method="Save"] [connection signal="button_clicked" from="Editor/WorkArea/Inspector/ResourceInspector/Tree" to="Editor/WorkArea/Inspector/ResourceInspector" method="OnTreeButtonClicked"] [connection signal="item_edited" from="Editor/WorkArea/Inspector/ResourceInspector/Tree" to="Editor/WorkArea/Inspector/ResourceInspector" method="OnItemEdited"] diff --git a/addons/pvzadventure/scenes/initial_editor.tscn b/addons/pvzadventure/scenes/initial-editor/initial_editor.tscn similarity index 98% rename from addons/pvzadventure/scenes/initial_editor.tscn rename to addons/pvzadventure/scenes/initial-editor/initial_editor.tscn index 0ec1e16..75a39d5 100644 --- a/addons/pvzadventure/scenes/initial_editor.tscn +++ b/addons/pvzadventure/scenes/initial-editor/initial_editor.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3 uid="uid://sqessjn0m4o3"] -[ext_resource type="PackedScene" uid="uid://djb8ynxhnmo0t" path="res://addons/pvzadventure/scenes/universal_grid_item.tscn" id="1_d8e2t"] +[ext_resource type="PackedScene" uid="uid://djb8ynxhnmo0t" path="res://addons/pvzadventure/scenes/initial-editor/universal_grid_item.tscn" id="1_d8e2t"] [ext_resource type="Script" uid="uid://cumeahjpjgagq" path="res://addons/pvzadventure/scripts/InitialEditor.cs" id="1_tu7vy"] [node name="InitialEditor" type="ScrollContainer"] diff --git a/addons/pvzadventure/scenes/universal_grid_item.tscn b/addons/pvzadventure/scenes/initial-editor/universal_grid_item.tscn similarity index 100% rename from addons/pvzadventure/scenes/universal_grid_item.tscn rename to addons/pvzadventure/scenes/initial-editor/universal_grid_item.tscn diff --git a/addons/pvzadventure/scenes/seedpack-editor/editor_seedpacket.tscn b/addons/pvzadventure/scenes/seedpack-editor/editor_seedpacket.tscn new file mode 100644 index 0000000..926cc1d --- /dev/null +++ b/addons/pvzadventure/scenes/seedpack-editor/editor_seedpacket.tscn @@ -0,0 +1,47 @@ +[gd_scene load_steps=4 format=3 uid="uid://dwbqlfs51en62"] + +[ext_resource type="Texture2D" uid="uid://dxyf557m4mq1p" path="res://assets/sprites/gui/EmptyPlantCard.png" id="1_dmimt"] +[ext_resource type="Texture2D" uid="uid://cabpf23ndlvx0" path="res://assets/sprites/gui/Selection.tres" id="2_0vy3a"] +[ext_resource type="Script" uid="uid://bhah157u6q56b" path="res://addons/pvzadventure/scripts/seedpacket-editor/DnDSeedpacket.cs" id="3_61l76"] + +[node name="EditorSeedpacket" type="TextureButton" node_paths=PackedStringArray("preview")] +anchors_preset = -1 +anchor_right = 0.103667 +anchor_bottom = 0.21 +offset_right = -0.199997 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("1_dmimt") +texture_focused = ExtResource("2_0vy3a") +stretch_mode = 0 +script = ExtResource("3_61l76") +preview = NodePath("PlantPreviewContainer/Preview") +metadata/_edit_use_anchors_ = true + +[node name="PlantPreviewContainer" type="Control" parent="."] +clip_contents = true +layout_mode = 1 +anchor_left = -0.061 +anchor_top = -0.036 +anchor_right = 1.061 +anchor_bottom = 0.661 +offset_left = 0.00199986 +offset_top = 0.0320001 +offset_right = -0.0019989 +offset_bottom = -0.0319977 +mouse_filter = 2 + +[node name="Preview" type="TextureRect" parent="PlantPreviewContainer"] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.185 +anchor_top = 0.205 +anchor_right = 0.815 +anchor_bottom = 1.333 +offset_left = -0.0200005 +offset_top = 0.00999928 +offset_right = 0.0199966 +offset_bottom = 0.0259933 +mouse_filter = 2 +mouse_default_cursor_shape = 2 +expand_mode = 1 +stretch_mode = 5 diff --git a/addons/pvzadventure/scenes/seedpack-editor/foribidden_editor_seedpacket.tscn b/addons/pvzadventure/scenes/seedpack-editor/foribidden_editor_seedpacket.tscn new file mode 100644 index 0000000..8258894 --- /dev/null +++ b/addons/pvzadventure/scenes/seedpack-editor/foribidden_editor_seedpacket.tscn @@ -0,0 +1,59 @@ +[gd_scene load_steps=5 format=3 uid="uid://dymyownbt688c"] + +[ext_resource type="Texture2D" uid="uid://dxyf557m4mq1p" path="res://assets/sprites/gui/EmptyPlantCard.png" id="1_x27jk"] +[ext_resource type="Texture2D" uid="uid://cabpf23ndlvx0" path="res://assets/sprites/gui/Selection.tres" id="2_m8071"] +[ext_resource type="Texture2D" uid="uid://cjkwy3u0wuax3" path="res://assets/sprites/gui/ForbiddenPacket.tres" id="3_ji8qd"] +[ext_resource type="Script" uid="uid://cy5t2lk5g75x7" path="res://addons/pvzadventure/scripts/seedpacket-editor/ForbiddableSeedpacket.cs" id="3_m8071"] + +[node name="EditorSeedpacket" type="TextureButton" node_paths=PackedStringArray("preview", "forrbidTexture")] +anchors_preset = -1 +anchor_right = 0.137 +anchor_bottom = 0.28 +offset_right = -0.199997 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("1_x27jk") +texture_focused = ExtResource("2_m8071") +stretch_mode = 0 +script = ExtResource("3_m8071") +preview = NodePath("PlantPreviewContainer/Preview") +forrbidTexture = NodePath("ForbiddenTexture") +metadata/_edit_use_anchors_ = true + +[node name="PlantPreviewContainer" type="Control" parent="."] +clip_contents = true +layout_mode = 1 +anchor_left = -0.061 +anchor_top = -0.036 +anchor_right = 1.061 +anchor_bottom = 0.661 +offset_left = 0.00199986 +offset_top = 0.0320001 +offset_right = -0.0019989 +offset_bottom = -0.0319977 +mouse_filter = 2 + +[node name="Preview" type="TextureRect" parent="PlantPreviewContainer"] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.185 +anchor_top = 0.205 +anchor_right = 0.815 +anchor_bottom = 1.333 +offset_left = -0.0200005 +offset_top = 0.00999928 +offset_right = 0.0199966 +offset_bottom = 0.0259933 +mouse_filter = 2 +mouse_default_cursor_shape = 2 +expand_mode = 1 +stretch_mode = 5 + +[node name="ForbiddenTexture" type="TextureRect" parent="."] +visible = false +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("3_ji8qd") diff --git a/addons/pvzadventure/scenes/seedpack-editor/seedpacket_editor.tscn b/addons/pvzadventure/scenes/seedpack-editor/seedpacket_editor.tscn new file mode 100644 index 0000000..2ab8ecc --- /dev/null +++ b/addons/pvzadventure/scenes/seedpack-editor/seedpacket_editor.tscn @@ -0,0 +1,155 @@ +[gd_scene load_steps=3 format=3 uid="uid://drc0o8du38apr"] + +[ext_resource type="PackedScene" uid="uid://dwbqlfs51en62" path="res://addons/pvzadventure/scenes/seedpack-editor/editor_seedpacket.tscn" id="1_m5lsd"] +[ext_resource type="Script" uid="uid://d1ks2q0c3eu0v" path="res://addons/pvzadventure/scripts/seedpacket-editor/SeedpacketEditor.cs" id="1_vrmxn"] + +[node name="SeedpacketEditor" type="ScrollContainer"] +texture_filter = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +horizontal_scroll_mode = 0 +script = ExtResource("1_vrmxn") +metadata/_edit_lock_ = true + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +metadata/_edit_lock_ = true + +[node name="PrepickedPlants" type="VBoxContainer" parent="VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="VBoxContainer/PrepickedPlants"] +layout_mode = 2 +text = "Prepicked plants" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="PrepickedContainer" type="HBoxContainer" parent="VBoxContainer/PrepickedPlants"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_vertical = 3 +alignment = 1 + +[node name="Slot1" type="AspectRatioContainer" parent="VBoxContainer/PrepickedPlants/PrepickedContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +ratio = 0.7321 + +[node name="Seedpacket" parent="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot1" instance=ExtResource("1_m5lsd")] +layout_mode = 2 + +[node name="Slot2" type="AspectRatioContainer" parent="VBoxContainer/PrepickedPlants/PrepickedContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +ratio = 0.7321 + +[node name="Seedpacket" parent="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot2" instance=ExtResource("1_m5lsd")] +layout_mode = 2 + +[node name="Slot3" type="AspectRatioContainer" parent="VBoxContainer/PrepickedPlants/PrepickedContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +ratio = 0.7321 + +[node name="Seedpacket" parent="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot3" instance=ExtResource("1_m5lsd")] +layout_mode = 2 + +[node name="Slot4" type="AspectRatioContainer" parent="VBoxContainer/PrepickedPlants/PrepickedContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +ratio = 0.7321 + +[node name="Seedpacket" parent="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot4" instance=ExtResource("1_m5lsd")] +layout_mode = 2 + +[node name="Slot5" type="AspectRatioContainer" parent="VBoxContainer/PrepickedPlants/PrepickedContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +ratio = 0.7321 + +[node name="Seedpacket" parent="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot5" instance=ExtResource("1_m5lsd")] +layout_mode = 2 + +[node name="Slot6" type="AspectRatioContainer" parent="VBoxContainer/PrepickedPlants/PrepickedContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +ratio = 0.7321 + +[node name="Seedpacket" parent="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot6" instance=ExtResource("1_m5lsd")] +layout_mode = 2 + +[node name="Slot7" type="AspectRatioContainer" parent="VBoxContainer/PrepickedPlants/PrepickedContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +ratio = 0.7321 + +[node name="Seedpacket" parent="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot7" instance=ExtResource("1_m5lsd")] +layout_mode = 2 + +[node name="Slot8" type="AspectRatioContainer" parent="VBoxContainer/PrepickedPlants/PrepickedContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +ratio = 0.7321 + +[node name="Seedpacket" parent="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot8" instance=ExtResource("1_m5lsd")] +layout_mode = 2 + +[node name="Slot9" type="AspectRatioContainer" parent="VBoxContainer/PrepickedPlants/PrepickedContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +ratio = 0.7321 + +[node name="Seedpacket" parent="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot9" instance=ExtResource("1_m5lsd")] +layout_mode = 2 + +[node name="ForbiddenTags" type="VBoxContainer" parent="VBoxContainer"] +visible = false +layout_mode = 2 +size_flags_vertical = 3 +alignment = 1 + +[node name="Label" type="Label" parent="VBoxContainer/ForbiddenTags"] +layout_mode = 2 +text = "Forbidden tags" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="TagsContainer" type="GridContainer" parent="VBoxContainer/ForbiddenTags"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_vertical = 3 +columns = 9 + +[node name="ForbiddenPlants" type="VBoxContainer" parent="VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +alignment = 1 + +[node name="Label" type="Label" parent="VBoxContainer/ForbiddenPlants"] +layout_mode = 2 +text = "Forbidden plants" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="FPlantsContainer" type="GridContainer" parent="VBoxContainer/ForbiddenPlants"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 3 +columns = 9 + +[connection signal="SaveCallback" from="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot1/Seedpacket" to="." method="Save"] +[connection signal="SaveCallback" from="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot2/Seedpacket" to="." method="Save"] +[connection signal="SaveCallback" from="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot3/Seedpacket" to="." method="Save"] +[connection signal="SaveCallback" from="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot4/Seedpacket" to="." method="Save"] +[connection signal="SaveCallback" from="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot5/Seedpacket" to="." method="Save"] +[connection signal="SaveCallback" from="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot6/Seedpacket" to="." method="Save"] +[connection signal="SaveCallback" from="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot7/Seedpacket" to="." method="Save"] +[connection signal="SaveCallback" from="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot8/Seedpacket" to="." method="Save"] +[connection signal="SaveCallback" from="VBoxContainer/PrepickedPlants/PrepickedContainer/Slot9/Seedpacket" to="." method="Save"] diff --git a/addons/pvzadventure/scenes/asset_browser_button.tscn b/addons/pvzadventure/scenes/zombie-editor/asset_browser_button.tscn similarity index 90% rename from addons/pvzadventure/scenes/asset_browser_button.tscn rename to addons/pvzadventure/scenes/zombie-editor/asset_browser_button.tscn index 5725a16..f135cd9 100644 --- a/addons/pvzadventure/scenes/asset_browser_button.tscn +++ b/addons/pvzadventure/scenes/zombie-editor/asset_browser_button.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3 uid="uid://iwnklc62rni8"] -[ext_resource type="Script" uid="uid://cpedvgx23hlko" path="res://addons/pvzadventure/scripts/ZE_AssetBrowserButton.cs" id="1_jbknv"] +[ext_resource type="Script" uid="uid://cpedvgx23hlko" path="res://addons/pvzadventure/scripts/zombie-editor/ZE_AssetBrowserButton.cs" id="1_jbknv"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jbknv"] bg_color = Color(0.18359, 0.18359, 0.18359, 1) diff --git a/addons/pvzadventure/scenes/ze_grid_item.tscn b/addons/pvzadventure/scenes/zombie-editor/ze_grid_item.tscn similarity index 91% rename from addons/pvzadventure/scenes/ze_grid_item.tscn rename to addons/pvzadventure/scenes/zombie-editor/ze_grid_item.tscn index 58534ee..ecc6455 100644 --- a/addons/pvzadventure/scenes/ze_grid_item.tscn +++ b/addons/pvzadventure/scenes/zombie-editor/ze_grid_item.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3 uid="uid://segxys6udhyw"] -[ext_resource type="Script" uid="uid://fof6kr0et8ng" path="res://addons/pvzadventure/scripts/ZE_GridItem.cs" id="1_fwfh1"] +[ext_resource type="Script" uid="uid://fof6kr0et8ng" path="res://addons/pvzadventure/scripts/zombie-editor/ZE_GridItem.cs" id="1_fwfh1"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jbknv"] bg_color = Color(0.18359, 0.18359, 0.18359, 1) diff --git a/addons/pvzadventure/scenes/ze_row_editor.tscn b/addons/pvzadventure/scenes/zombie-editor/ze_row_editor.tscn similarity index 80% rename from addons/pvzadventure/scenes/ze_row_editor.tscn rename to addons/pvzadventure/scenes/zombie-editor/ze_row_editor.tscn index b06dfcd..38390c9 100644 --- a/addons/pvzadventure/scenes/ze_row_editor.tscn +++ b/addons/pvzadventure/scenes/zombie-editor/ze_row_editor.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://buvnw8a7pku78"] -[ext_resource type="Script" uid="uid://q84g5imvatfl" path="res://addons/pvzadventure/scripts/ZE_RowEditor.cs" id="1_wm7b4"] +[ext_resource type="Script" uid="uid://q84g5imvatfl" path="res://addons/pvzadventure/scripts/zombie-editor/ZE_RowEditor.cs" id="1_wm7b4"] [node name="RowEditor" type="VBoxContainer"] anchors_preset = 15 diff --git a/addons/pvzadventure/scenes/zombie_editor.tscn b/addons/pvzadventure/scenes/zombie-editor/zombie_editor.tscn similarity index 96% rename from addons/pvzadventure/scenes/zombie_editor.tscn rename to addons/pvzadventure/scenes/zombie-editor/zombie_editor.tscn index c5426c2..c799abf 100644 --- a/addons/pvzadventure/scenes/zombie_editor.tscn +++ b/addons/pvzadventure/scenes/zombie-editor/zombie_editor.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=10 format=3 uid="uid://db5ah76l43ng2"] -[ext_resource type="Script" uid="uid://bnuno3uhya4sg" path="res://addons/pvzadventure/scripts/ZE_AssetBrowser.cs" id="1_klhya"] -[ext_resource type="Script" uid="uid://bd5hl0etgvf5a" path="res://addons/pvzadventure/scripts/ZombieEditor.cs" id="1_thd7y"] -[ext_resource type="Script" uid="uid://do7s5mo36c280" path="res://addons/pvzadventure/scripts/ZE_GridContainer.cs" id="2_13ic4"] +[ext_resource type="Script" uid="uid://bnuno3uhya4sg" path="res://addons/pvzadventure/scripts/zombie-editor/ZE_AssetBrowser.cs" id="1_klhya"] +[ext_resource type="Script" uid="uid://bd5hl0etgvf5a" path="res://addons/pvzadventure/scripts/zombie-editor/ZombieEditor.cs" id="1_thd7y"] +[ext_resource type="Script" uid="uid://do7s5mo36c280" path="res://addons/pvzadventure/scripts/zombie-editor/ZE_GridContainer.cs" id="2_13ic4"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_thd7y"] bg_color = Color(0.430693, 0.742747, 0.314214, 1) diff --git a/addons/pvzadventure/scripts/BaseEditor.cs b/addons/pvzadventure/scripts/BaseEditor.cs new file mode 100644 index 0000000..751a183 --- /dev/null +++ b/addons/pvzadventure/scripts/BaseEditor.cs @@ -0,0 +1,16 @@ +using Godot; + +[Tool] +public abstract partial class BaseEditor : Node +{ + public AdventureLevelResource editedResource; + [Signal] public delegate void SaveCallbackEventHandler(); + public virtual void SetEditedData(AdventureLevelResource data) + { + editedResource = data; + } + public virtual void Save() + { + EmitSignal(SignalName.SaveCallback); + } +} diff --git a/addons/pvzadventure/scripts/BaseEditor.cs.uid b/addons/pvzadventure/scripts/BaseEditor.cs.uid new file mode 100644 index 0000000..7effb93 --- /dev/null +++ b/addons/pvzadventure/scripts/BaseEditor.cs.uid @@ -0,0 +1 @@ +uid://dxtrrfg1pba4p diff --git a/addons/pvzadventure/scripts/BaseWaveEditor.cs b/addons/pvzadventure/scripts/BaseWaveEditor.cs new file mode 100644 index 0000000..7bfb72d --- /dev/null +++ b/addons/pvzadventure/scripts/BaseWaveEditor.cs @@ -0,0 +1,5 @@ +public abstract partial class BaseWaveEditor : BaseEditor +{ + public WaveData editedWave; + public abstract void SetEditedWave(WaveData wave); +} diff --git a/addons/pvzadventure/scripts/BaseWaveEditor.cs.uid b/addons/pvzadventure/scripts/BaseWaveEditor.cs.uid new file mode 100644 index 0000000..b12ecb4 --- /dev/null +++ b/addons/pvzadventure/scripts/BaseWaveEditor.cs.uid @@ -0,0 +1 @@ +uid://b23csior6audk diff --git a/addons/pvzadventure/scripts/InitialEditor.cs b/addons/pvzadventure/scripts/InitialEditor.cs index 1ebcb4b..4048452 100644 --- a/addons/pvzadventure/scripts/InitialEditor.cs +++ b/addons/pvzadventure/scripts/InitialEditor.cs @@ -1,10 +1,8 @@ using Godot; [Tool] -public partial class InitialEditor : Node +public partial class InitialEditor : BaseEditor { - public AdventureLevelResource editedResource; - [Signal] public delegate void SaveCallbackEventHandler(); public override void _Ready() { foreach (var child in GetChild(0).GetChildren()) @@ -15,7 +13,7 @@ public partial class InitialEditor : Node } } } - public void SetData(AdventureLevelResource resource) + public override void SetEditedData(AdventureLevelResource resource) { editedResource = resource; for (int i = 0; i < GetChild(0).GetChildCount(); i++) diff --git a/addons/pvzadventure/scripts/ZombieEditor.cs b/addons/pvzadventure/scripts/ZombieEditor.cs deleted file mode 100644 index dd82404..0000000 --- a/addons/pvzadventure/scripts/ZombieEditor.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Godot; - - -[Tool] -public partial class ZombieEditor : VBoxContainer -{ - public WaveData editedWave; - [Export] private ZE_GridContainer container; - [Signal] public delegate void SaveCallbackEventHandler(); - - public void SetEditedWave(WaveData data) - { - editedWave = data; - container.SetData(editedWave); - } - public void Save() - { - EmitSignal(SignalName.SaveCallback); - } -} diff --git a/addons/pvzadventure/scripts/AdventureEditor.cs b/addons/pvzadventure/scripts/adventure-editor/AdventureEditor.cs similarity index 75% rename from addons/pvzadventure/scripts/AdventureEditor.cs rename to addons/pvzadventure/scripts/adventure-editor/AdventureEditor.cs index 196799c..32b1ccd 100644 --- a/addons/pvzadventure/scripts/AdventureEditor.cs +++ b/addons/pvzadventure/scripts/adventure-editor/AdventureEditor.cs @@ -55,11 +55,22 @@ public partial class AdventureEditor : MarginContainer HardReload(); } } - public override void _ExitTree() - { - EditorInterface.Singleton.GetInspector().PropertyEdited -= OnInspectorPropertyChanged; + public void Play() + { + if (ResourceLoader.Exists(editedPath) == false) return; + var player = new AdventurePlayer(); + var packed = new PackedScene(); + player.pathToLevel = editedPath; + packed.Pack(player); + ResourceSaver.Save(packed, "res://addons/pvzadventure/cache/player.tscn"); + EditorInterface.Singleton.PlayCustomScene("res://addons/pvzadventure/cache/player.tscn"); + } + public override void _ExitTree() + { + EditorInterface.Singleton.GetInspector().PropertyEdited -= OnInspectorPropertyChanged; EditorInterface.Singleton.GetInspector().EditedObjectChanged -= OnResourceChanged; - } + } + } #endif \ No newline at end of file diff --git a/addons/pvzadventure/scripts/AdventureEditor.cs.uid b/addons/pvzadventure/scripts/adventure-editor/AdventureEditor.cs.uid similarity index 100% rename from addons/pvzadventure/scripts/AdventureEditor.cs.uid rename to addons/pvzadventure/scripts/adventure-editor/AdventureEditor.cs.uid diff --git a/addons/pvzadventure/scripts/adventure-editor/AdventurePlayer.cs b/addons/pvzadventure/scripts/adventure-editor/AdventurePlayer.cs new file mode 100644 index 0000000..fcc8ba4 --- /dev/null +++ b/addons/pvzadventure/scripts/adventure-editor/AdventurePlayer.cs @@ -0,0 +1,19 @@ +using Godot; +using Newlon; + +[Tool] +public partial class AdventurePlayer : Node +{ + const string tilesetUID = "uid://dd3yegl1xo44m"; + [Export] public string pathToLevel; + public override void _Ready() + { + if (Engine.IsEditorHint()) return; + + CallDeferred("InitLevel"); + } + private void InitLevel() + { + LevelController.Instance.StartLevel(ResourceLoader.Load(tilesetUID), ResourceLoader.Load(pathToLevel)); + } +} diff --git a/addons/pvzadventure/scripts/adventure-editor/AdventurePlayer.cs.uid b/addons/pvzadventure/scripts/adventure-editor/AdventurePlayer.cs.uid new file mode 100644 index 0000000..160fa99 --- /dev/null +++ b/addons/pvzadventure/scripts/adventure-editor/AdventurePlayer.cs.uid @@ -0,0 +1 @@ +uid://bbkfrk07l6kev diff --git a/addons/pvzadventure/scripts/AdventureResourceInspector.cs b/addons/pvzadventure/scripts/adventure-editor/AdventureResourceInspector.cs similarity index 78% rename from addons/pvzadventure/scripts/AdventureResourceInspector.cs rename to addons/pvzadventure/scripts/adventure-editor/AdventureResourceInspector.cs index 53532b8..9e00a9c 100644 --- a/addons/pvzadventure/scripts/AdventureResourceInspector.cs +++ b/addons/pvzadventure/scripts/adventure-editor/AdventureResourceInspector.cs @@ -11,8 +11,10 @@ public partial class AdventureResourceInspector : Node const string ZOMBIES_ITEM_NAME = "Zombies"; const string EVENTS_ITEM_NAME = "Events"; const string HUGEWAVE_ITEM_NAME = "Is huge wave?"; + const string SEEDPACKETS_ITEM_NAME = "Seedpackets editor"; private PackedScene zombieEditorScene = ResourceLoader.Load("uid://db5ah76l43ng2"); private PackedScene initialEditorScene = ResourceLoader.Load("uid://sqessjn0m4o3"); + private PackedScene seedpacketEditorScene = ResourceLoader.Load("uid://drc0o8du38apr"); private Tree tree; private AdventureLevelResource heldResource; @@ -28,6 +30,7 @@ public partial class AdventureResourceInspector : Node private TreeItem root; private TreeItem initialData; + private TreeItem seedpacketData; public override void _Ready() { @@ -48,6 +51,7 @@ public partial class AdventureResourceInspector : Node root = CreateItem(LEVEL_ITEM_NAME); initialData = CreateItem(INITIAL_ITEM_NAME, root); + seedpacketData = CreateItem(SEEDPACKETS_ITEM_NAME, root); for (int i = 0; i < heldResource.waves.Count; i++) { @@ -58,7 +62,7 @@ public partial class AdventureResourceInspector : Node CreateItem(EVENTS_ITEM_NAME, wave); CreateItem(HUGEWAVE_ITEM_NAME, TreeItem.TreeCellMode.Check, true, wave) .SetChecked(0, heldResource.waves[i].isHugeWave); - + var delay = tree.CreateItem(wave); if (heldResource.waves[i].customWaveDelay > 0) @@ -94,8 +98,7 @@ public partial class AdventureResourceInspector : Node var editor = zombieEditorScene.Instantiate(); editorContainer.AddChild(editor); - editor.SetEditedWave(heldResource.waves[GetWaveIndex(selected.GetParent())]); - editor.SaveCallback += adventureEditor.Save; + SetupWaveEditor(editor, heldResource.waves[GetWaveIndex(selected.GetParent())]); return; case EVENTS_ITEM_NAME: @@ -103,9 +106,14 @@ public partial class AdventureResourceInspector : Node case INITIAL_ITEM_NAME: var initialEditor = initialEditorScene.Instantiate(); editorContainer.AddChild(initialEditor); - initialEditor.SetData(heldResource); - initialEditor.SaveCallback += adventureEditor.Save; + SetupEditor(initialEditor); break; + case SEEDPACKETS_ITEM_NAME: + var seedpacketEditor = seedpacketEditorScene.Instantiate(); + editorContainer.AddChild(seedpacketEditor); + SetupEditor(seedpacketEditor); + break; + } } @@ -145,17 +153,37 @@ public partial class AdventureResourceInspector : Node } private TreeItem CreateItem(string Name, TreeItem root = null) { - var item = tree.CreateItem(root); - item.SetText(0, Name); - return item; + if (root == null) + { + var item = tree.CreateItem(); + item.SetText(0, Name); + return item; + } + else + { + var item = tree.CreateItem(root); + item.SetText(0, Name); + return item; + } } private TreeItem CreateItem(string Name, TreeItem.TreeCellMode cellMode, bool editable, TreeItem root = null) { var item = tree.CreateItem(root); - item.SetCellMode(0,cellMode); + item.SetCellMode(0, cellMode); item.SetEditable(0, editable); item.SetText(0, Name); return item; } + private void SetupEditor(BaseEditor editor) + { + editor.SetEditedData(heldResource); + editor.SaveCallback += adventureEditor.Save; + } + private void SetupWaveEditor(BaseWaveEditor editor, WaveData editedWave) + { + SetupEditor(editor); + editor.SetEditedWave(editedWave); + } } + #endif \ No newline at end of file diff --git a/addons/pvzadventure/scripts/AdventureResourceInspector.cs.uid b/addons/pvzadventure/scripts/adventure-editor/AdventureResourceInspector.cs.uid similarity index 100% rename from addons/pvzadventure/scripts/AdventureResourceInspector.cs.uid rename to addons/pvzadventure/scripts/adventure-editor/AdventureResourceInspector.cs.uid diff --git a/addons/pvzadventure/scripts/seedpacket-editor/DnDSeedpacket.cs b/addons/pvzadventure/scripts/seedpacket-editor/DnDSeedpacket.cs new file mode 100644 index 0000000..09d8c01 --- /dev/null +++ b/addons/pvzadventure/scripts/seedpacket-editor/DnDSeedpacket.cs @@ -0,0 +1,51 @@ +using Godot; +using Newlon.Resources; + +[Tool] +public partial class DnDSeedpacket : TextureButton +{ + [Signal] public delegate void SaveCallbackEventHandler(); + [Export] private TextureRect preview; + public PlantResource HeldResource; + + public override bool _CanDropData(Vector2 atPosition, Variant data) + { + if (data.VariantType == Variant.Type.Dictionary) + { + if ((string)data.AsGodotDictionary()["type"] == "files") + { + return ResourceLoader.Load(data.AsGodotDictionary()["files"].AsGodotArray()[0]) is PlantResource; + } + } + return false; + } + + public override void _DropData(Vector2 atPosition, Variant data) + { + HeldResource = ResourceLoader.Load(data.AsGodotDictionary()["files"].AsGodotArray()[0]) as PlantResource; + Update(); + } + public override void _Pressed() + { + HeldResource = null; + Update(); + } + + private void Update() + { + RefreshTexture(); + EmitSignal(SignalName.SaveCallback); + } + public void RefreshTexture() + { + if (HeldResource != null) + { + preview.Texture = HeldResource.Preview; + } + else + { + preview.Texture = null; + } + } + +} diff --git a/addons/pvzadventure/scripts/seedpacket-editor/DnDSeedpacket.cs.uid b/addons/pvzadventure/scripts/seedpacket-editor/DnDSeedpacket.cs.uid new file mode 100644 index 0000000..0485078 --- /dev/null +++ b/addons/pvzadventure/scripts/seedpacket-editor/DnDSeedpacket.cs.uid @@ -0,0 +1 @@ +uid://bhah157u6q56b diff --git a/addons/pvzadventure/scripts/seedpacket-editor/ForbiddableSeedpacket.cs b/addons/pvzadventure/scripts/seedpacket-editor/ForbiddableSeedpacket.cs new file mode 100644 index 0000000..5d2c9e0 --- /dev/null +++ b/addons/pvzadventure/scripts/seedpacket-editor/ForbiddableSeedpacket.cs @@ -0,0 +1,28 @@ +using Godot; +using Newlon.Resources; + +[Tool] +public partial class ForbiddableSeedpacket : TextureButton +{ + [Signal] public delegate void SaveCallbackEventHandler(); + [Export] private TextureRect preview; + [Export] private TextureRect forrbidTexture; + public PlantResource HeldResource; + public bool forbidden = false; + public override void _Pressed() + { + forbidden = !forbidden; + Update(); + } + + private void Update() + { + RefreshTexture(); + EmitSignal(SignalName.SaveCallback); + } + public void RefreshTexture() + { + preview.Texture = HeldResource.Preview; + forrbidTexture.Visible = forbidden; + } +} diff --git a/addons/pvzadventure/scripts/seedpacket-editor/ForbiddableSeedpacket.cs.uid b/addons/pvzadventure/scripts/seedpacket-editor/ForbiddableSeedpacket.cs.uid new file mode 100644 index 0000000..957fc62 --- /dev/null +++ b/addons/pvzadventure/scripts/seedpacket-editor/ForbiddableSeedpacket.cs.uid @@ -0,0 +1 @@ +uid://cy5t2lk5g75x7 diff --git a/addons/pvzadventure/scripts/seedpacket-editor/SeedpacketEditor.cs b/addons/pvzadventure/scripts/seedpacket-editor/SeedpacketEditor.cs new file mode 100644 index 0000000..1265a70 --- /dev/null +++ b/addons/pvzadventure/scripts/seedpacket-editor/SeedpacketEditor.cs @@ -0,0 +1,101 @@ +using System.Collections.Generic; +using Godot; +using Godot.Collections; +using Newlon.Components.GUI; +using Newlon.Resources; + +[Tool] +public partial class SeedpacketEditor : BaseEditor +{ + private const string PLANTS_DIRECTORY = "res://assets/plants/"; + public override void SetEditedData(AdventureLevelResource data) + { + base.SetEditedData(data); + SetupPrepickedPlants(); + SetupForbiddablePlants(); + } + + public override void Save() + { + CalculatePrepickedPlants(); + CalculateForbiddenPlants(); + base.Save(); + } + private void SetupPrepickedPlants() + { + for (int i = 0; i < editedResource.prepickedPlants.Count; i++) + { + if (GetNode("%PrepickedContainer").GetChild(i).GetNode("Seedpacket") is DnDSeedpacket packet) + { + packet.HeldResource = TryGetPlant(editedResource.prepickedPlants[i]); + packet.RefreshTexture(); + } + } + } + private void SetupForbiddablePlants() + { + var plants = GetPlants(); + var packed = ResourceLoader.Load("uid://dymyownbt688c"); + for (int i = 0; i < plants.Count; i++) + { + var seedpacket = packed.Instantiate(); + seedpacket.HeldResource = plants[i]; + seedpacket.forbidden = editedResource.forbiddenPlants.Contains(plants[i].GetInternalID()); + seedpacket.RefreshTexture(); + seedpacket.SaveCallback += Save; + + GetNode("%FPlantsContainer").AddChild(seedpacket); + } + } + private void CalculatePrepickedPlants() + { + Array prepicked = new(); + foreach (var child in GetNode("%PrepickedContainer").GetChildren()) + { + if (child.GetNode("Seedpacket") is DnDSeedpacket packet && packet.HeldResource != null) + { + prepicked.Add(packet.HeldResource.GetInternalID()); + } + } + editedResource.prepickedPlants = prepicked; + } + private void CalculateForbiddenPlants() + { + Array forbidden = new(); + + foreach (var child in GetNode("%FPlantsContainer").GetChildren()) + { + if (child is ForbiddableSeedpacket packet && packet.forbidden) + { + forbidden.Add(packet.HeldResource.GetInternalID()); + } + } + + editedResource.forbiddenPlants = forbidden; + } + private PlantResource TryGetPlant(string plantName) + { + foreach (var file in ResourceLoader.ListDirectory(PLANTS_DIRECTORY)) + { + if (plantName != file.TrimSuffix(".tres").ToLower()) continue; + return ResourceLoader.Load(PLANTS_DIRECTORY + file); + } + return null; + } + private List GetPlants() + { + var result = new List(); + + foreach (var file in ResourceLoader.ListDirectory(PLANTS_DIRECTORY)) + { + result.Add(ResourceLoader.Load(PLANTS_DIRECTORY + file)); + } + result.Sort((a, b) => + { + return a.Order - b.Order; + }); + + return result; + } + +} diff --git a/addons/pvzadventure/scripts/seedpacket-editor/SeedpacketEditor.cs.uid b/addons/pvzadventure/scripts/seedpacket-editor/SeedpacketEditor.cs.uid new file mode 100644 index 0000000..63f09ec --- /dev/null +++ b/addons/pvzadventure/scripts/seedpacket-editor/SeedpacketEditor.cs.uid @@ -0,0 +1 @@ +uid://d1ks2q0c3eu0v diff --git a/addons/pvzadventure/scripts/ZE_AssetBrowser.cs b/addons/pvzadventure/scripts/zombie-editor/ZE_AssetBrowser.cs similarity index 100% rename from addons/pvzadventure/scripts/ZE_AssetBrowser.cs rename to addons/pvzadventure/scripts/zombie-editor/ZE_AssetBrowser.cs diff --git a/addons/pvzadventure/scripts/ZE_AssetBrowser.cs.uid b/addons/pvzadventure/scripts/zombie-editor/ZE_AssetBrowser.cs.uid similarity index 100% rename from addons/pvzadventure/scripts/ZE_AssetBrowser.cs.uid rename to addons/pvzadventure/scripts/zombie-editor/ZE_AssetBrowser.cs.uid diff --git a/addons/pvzadventure/scripts/ZE_AssetBrowserButton.cs b/addons/pvzadventure/scripts/zombie-editor/ZE_AssetBrowserButton.cs similarity index 100% rename from addons/pvzadventure/scripts/ZE_AssetBrowserButton.cs rename to addons/pvzadventure/scripts/zombie-editor/ZE_AssetBrowserButton.cs diff --git a/addons/pvzadventure/scripts/ZE_AssetBrowserButton.cs.uid b/addons/pvzadventure/scripts/zombie-editor/ZE_AssetBrowserButton.cs.uid similarity index 100% rename from addons/pvzadventure/scripts/ZE_AssetBrowserButton.cs.uid rename to addons/pvzadventure/scripts/zombie-editor/ZE_AssetBrowserButton.cs.uid diff --git a/addons/pvzadventure/scripts/ZE_GridContainer.cs b/addons/pvzadventure/scripts/zombie-editor/ZE_GridContainer.cs similarity index 100% rename from addons/pvzadventure/scripts/ZE_GridContainer.cs rename to addons/pvzadventure/scripts/zombie-editor/ZE_GridContainer.cs diff --git a/addons/pvzadventure/scripts/ZE_GridContainer.cs.uid b/addons/pvzadventure/scripts/zombie-editor/ZE_GridContainer.cs.uid similarity index 100% rename from addons/pvzadventure/scripts/ZE_GridContainer.cs.uid rename to addons/pvzadventure/scripts/zombie-editor/ZE_GridContainer.cs.uid diff --git a/addons/pvzadventure/scripts/ZE_GridItem.cs b/addons/pvzadventure/scripts/zombie-editor/ZE_GridItem.cs similarity index 100% rename from addons/pvzadventure/scripts/ZE_GridItem.cs rename to addons/pvzadventure/scripts/zombie-editor/ZE_GridItem.cs diff --git a/addons/pvzadventure/scripts/ZE_GridItem.cs.uid b/addons/pvzadventure/scripts/zombie-editor/ZE_GridItem.cs.uid similarity index 100% rename from addons/pvzadventure/scripts/ZE_GridItem.cs.uid rename to addons/pvzadventure/scripts/zombie-editor/ZE_GridItem.cs.uid diff --git a/addons/pvzadventure/scripts/ZE_RowEditor.cs b/addons/pvzadventure/scripts/zombie-editor/ZE_RowEditor.cs similarity index 100% rename from addons/pvzadventure/scripts/ZE_RowEditor.cs rename to addons/pvzadventure/scripts/zombie-editor/ZE_RowEditor.cs diff --git a/addons/pvzadventure/scripts/ZE_RowEditor.cs.uid b/addons/pvzadventure/scripts/zombie-editor/ZE_RowEditor.cs.uid similarity index 100% rename from addons/pvzadventure/scripts/ZE_RowEditor.cs.uid rename to addons/pvzadventure/scripts/zombie-editor/ZE_RowEditor.cs.uid diff --git a/addons/pvzadventure/scripts/zombie-editor/ZombieEditor.cs b/addons/pvzadventure/scripts/zombie-editor/ZombieEditor.cs new file mode 100644 index 0000000..2b78024 --- /dev/null +++ b/addons/pvzadventure/scripts/zombie-editor/ZombieEditor.cs @@ -0,0 +1,14 @@ +using Godot; + + +[Tool] +public partial class ZombieEditor : BaseWaveEditor +{ + [Export] private ZE_GridContainer container; + + public override void SetEditedWave(WaveData data) + { + editedWave = data; + container.SetData(editedWave); + } +} diff --git a/addons/pvzadventure/scripts/ZombieEditor.cs.uid b/addons/pvzadventure/scripts/zombie-editor/ZombieEditor.cs.uid similarity index 100% rename from addons/pvzadventure/scripts/ZombieEditor.cs.uid rename to addons/pvzadventure/scripts/zombie-editor/ZombieEditor.cs.uid diff --git a/assets/audio/music/Toxa/Unused.wav b/assets/audio/music/Toxa/Unused.wav new file mode 100644 index 0000000..30c0924 Binary files /dev/null and b/assets/audio/music/Toxa/Unused.wav differ diff --git a/assets/audio/music/Toxa/Unused.wav.import b/assets/audio/music/Toxa/Unused.wav.import new file mode 100644 index 0000000..69bfb49 --- /dev/null +++ b/assets/audio/music/Toxa/Unused.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://c44gskf7yfesf" +path="res://.godot/imported/Unused.wav-2f2dac554870b53469f1bdb73d0c0e26.sample" + +[deps] + +source_file="res://assets/audio/music/Toxa/Unused.wav" +dest_files=["res://.godot/imported/Unused.wav-2f2dac554870b53469f1bdb73d0c0e26.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2 diff --git a/assets/audio/music/Toxa/Upcoming Serenity.wav b/assets/audio/music/Toxa/Upcoming Serenity.wav new file mode 100644 index 0000000..de357c7 Binary files /dev/null and b/assets/audio/music/Toxa/Upcoming Serenity.wav differ diff --git a/assets/audio/music/Toxa/Upcoming Serenity.wav.import b/assets/audio/music/Toxa/Upcoming Serenity.wav.import new file mode 100644 index 0000000..cda93ec --- /dev/null +++ b/assets/audio/music/Toxa/Upcoming Serenity.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://cp7c8ys8sk2r0" +path="res://.godot/imported/Upcoming Serenity.wav-e270d55d84d3b3d770e21b978abdb52d.sample" + +[deps] + +source_file="res://assets/audio/music/Toxa/Upcoming Serenity.wav" +dest_files=["res://.godot/imported/Upcoming Serenity.wav-e270d55d84d3b3d770e21b978abdb52d.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2 diff --git a/assets/effects/GarlicEffect.tres b/assets/effects/GarlicEffect.tres index 5696f04..7ef6399 100644 --- a/assets/effects/GarlicEffect.tres +++ b/assets/effects/GarlicEffect.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" load_steps=2 format=3 uid="uid://dsg1vjx76ifgu"] +[gd_resource type="Resource" script_class="RandomRedirectEffect" load_steps=2 format=3 uid="uid://dsg1vjx76ifgu"] -[ext_resource type="Script" uid="uid://bb6lv1djnqjaw" path="res://scripts/systems/effects/GarlicEffect.cs" id="1_rfumy"] +[ext_resource type="Script" uid="uid://bb6lv1djnqjaw" path="res://scripts/systems/effects/RandomRedirectEffect.cs" id="1_rfumy"] [resource] script = ExtResource("1_rfumy") -Duration = 1.0 +tilesWalked = 0.2 +Duration = 3.0 Slot = "garlic" diff --git a/assets/effects/NerdusEffect.tres b/assets/effects/NerdusEffect.tres index b2bb49f..2eda568 100644 --- a/assets/effects/NerdusEffect.tres +++ b/assets/effects/NerdusEffect.tres @@ -1,8 +1,9 @@ [gd_resource type="Resource" load_steps=2 format=3 uid="uid://dme4nvp28otq6"] -[ext_resource type="Script" uid="uid://bb6lv1djnqjaw" path="res://scripts/systems/effects/GarlicEffect.cs" id="1_bd12u"] +[ext_resource type="Script" uid="uid://bb6lv1djnqjaw" path="res://scripts/systems/effects/RandomRedirectEffect.cs" id="1_bd12u"] [resource] script = ExtResource("1_bd12u") +tilesWalked = 0.2 Duration = 0.25 Slot = "garlic" diff --git a/assets/levels/balance_and_spawn_test.tres b/assets/levels/balance_and_spawn_test.tres index 5ff7aae..74d97a8 100644 --- a/assets/levels/balance_and_spawn_test.tres +++ b/assets/levels/balance_and_spawn_test.tres @@ -131,6 +131,8 @@ wavePercentage = 0.5 standardWaveDelay = 30.0 initialWaveDelay = 20.0 reward = ExtResource("1_pd3l1") -forbiddenPlants = [] -waves = [SubResource("Resource_qsvr4"), SubResource("Resource_otfbt"), SubResource("Resource_nv3y4"), SubResource("Resource_mt5r8"), SubResource("Resource_kugcf"), SubResource("Resource_oyvhx"), SubResource("Resource_k4k25"), SubResource("Resource_oxbea"), SubResource("Resource_5cdj6")] +forbiddenPlants = Array[String](["peashooter", "threepeater"]) +forbiddenTags = Array[String]([]) +prepickedPlants = Array[String](["nerdus"]) +waves = Array[ExtResource("3_cugtx")]([SubResource("Resource_qsvr4"), SubResource("Resource_otfbt"), SubResource("Resource_nv3y4"), SubResource("Resource_mt5r8"), SubResource("Resource_kugcf"), SubResource("Resource_oyvhx"), SubResource("Resource_k4k25"), SubResource("Resource_oxbea"), SubResource("Resource_5cdj6")]) initialScenes = Array[PackedScene]([null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]) diff --git a/assets/levels/tile_test.tres b/assets/levels/tile_test.tres new file mode 100644 index 0000000..6f7fc01 --- /dev/null +++ b/assets/levels/tile_test.tres @@ -0,0 +1,53 @@ +[gd_resource type="Resource" script_class="AdventureLevelResource" load_steps=18 format=3 uid="uid://b6txurjc3j8n8"] + +[ext_resource type="PackedScene" uid="uid://cp8oadhwu51i7" path="res://scenes/entities/tiles/redirect_down_tile.tscn" id="1_8ahni"] +[ext_resource type="Script" uid="uid://bximdujbkj2n4" path="res://addons/pvzadventure/AdventureLevelResource.cs" id="1_nvwhw"] +[ext_resource type="PackedScene" uid="uid://c5lplejgx7mex" path="res://scenes/entities/tiles/speed_tile.tscn" id="2_4or4b"] +[ext_resource type="Script" uid="uid://7rptlb5qr3b6" path="res://addons/pvzadventure/WaveData.cs" id="2_8ahni"] +[ext_resource type="PackedScene" uid="uid://d4kee4ipw1k1q" path="res://scenes/entities/tiles/redirect_up_tile.tscn" id="2_w7xe8"] +[ext_resource type="PackedScene" uid="uid://cy0puq5mtnxq7" path="res://scenes/entities/tiles/slow_tile.tscn" id="3_1dd05"] +[ext_resource type="Resource" uid="uid://bhy1gc3vi8le1" path="res://assets/rewards/GarlicReward.tres" id="5_gern8"] +[ext_resource type="Script" uid="uid://cw7yc3i2lgcja" path="res://addons/pvzadventure/WaveEvent.cs" id="7_nm8hx"] +[ext_resource type="Script" uid="uid://dl12rj75tk2qi" path="res://addons/pvzadventure/RowSpawn.cs" id="8_x4xyo"] +[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/entities/ZombieResource.cs" id="9_2qvjb"] +[ext_resource type="Resource" uid="uid://buvacn56kyy2p" path="res://assets/zombies/basic.tres" id="10_gern8"] + +[sub_resource type="Resource" id="Resource_u4615"] +script = ExtResource("8_x4xyo") +zombies = Array[ExtResource("9_2qvjb")]([null, ExtResource("10_gern8"), null, null, ExtResource("10_gern8")]) + +[sub_resource type="Resource" id="Resource_gern8"] +script = ExtResource("8_x4xyo") +zombies = Array[ExtResource("9_2qvjb")]([null, ExtResource("10_gern8"), null, null, ExtResource("10_gern8")]) + +[sub_resource type="Resource" id="Resource_u7b14"] +script = ExtResource("8_x4xyo") +zombies = Array[ExtResource("9_2qvjb")]([null, ExtResource("10_gern8"), null, null, ExtResource("10_gern8")]) + +[sub_resource type="Resource" id="Resource_gmxhq"] +script = ExtResource("8_x4xyo") +zombies = Array[ExtResource("9_2qvjb")]([null, ExtResource("10_gern8"), null, null, ExtResource("10_gern8")]) + +[sub_resource type="Resource" id="Resource_gjnpd"] +script = ExtResource("8_x4xyo") +zombies = Array[ExtResource("9_2qvjb")]([null, ExtResource("10_gern8"), null, null, ExtResource("10_gern8")]) + +[sub_resource type="Resource" id="Resource_2qvjb"] +script = ExtResource("2_8ahni") +zombiesOrdered = Array[ExtResource("8_x4xyo")]([SubResource("Resource_u4615"), SubResource("Resource_gern8"), SubResource("Resource_u7b14"), SubResource("Resource_gmxhq"), SubResource("Resource_gjnpd")]) +events = Array[ExtResource("7_nm8hx")]([]) +customWaveDelay = 0.0 +isHugeWave = false + +[resource] +script = ExtResource("1_nvwhw") +startSun = 50 +wavePercentage = 0.0 +standardWaveDelay = 10.0 +initialWaveDelay = 10.0 +reward = ExtResource("5_gern8") +forbiddenPlants = Array[String]([]) +forbiddenTags = Array[String]([]) +prepickedPlants = Array[String]([]) +waves = Array[ExtResource("2_8ahni")]([SubResource("Resource_2qvjb")]) +initialScenes = Array[PackedScene]([null, null, null, null, null, null, null, null, null, null, null, ExtResource("2_4or4b"), null, null, ExtResource("1_8ahni"), null, null, null, null, null, ExtResource("2_w7xe8"), null, null, ExtResource("2_4or4b"), null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, ExtResource("3_1dd05"), ExtResource("3_1dd05"), null, null, null]) diff --git a/assets/levels/video_level.tres b/assets/levels/video_level.tres index e9942cd..8219e51 100644 --- a/assets/levels/video_level.tres +++ b/assets/levels/video_level.tres @@ -1,7 +1,11 @@ -[gd_resource type="Resource" script_class="AdventureLevelResource" load_steps=64 format=3 uid="uid://dwd5oqr0tuvhv"] +[gd_resource type="Resource" script_class="AdventureLevelResource" load_steps=68 format=3 uid="uid://dwd5oqr0tuvhv"] [ext_resource type="Resource" uid="uid://c268ghdrraxgr" path="res://assets/rewards/NerdusReward.tres" id="1_eqa0o"] +[ext_resource type="PackedScene" uid="uid://c5lplejgx7mex" path="res://scenes/entities/tiles/speed_tile.tscn" id="1_jfmww"] +[ext_resource type="PackedScene" uid="uid://cp8oadhwu51i7" path="res://scenes/entities/tiles/redirect_down_tile.tscn" id="1_qx8xe"] [ext_resource type="Script" uid="uid://bximdujbkj2n4" path="res://addons/pvzadventure/AdventureLevelResource.cs" id="1_r0wru"] +[ext_resource type="PackedScene" uid="uid://cy0puq5mtnxq7" path="res://scenes/entities/tiles/slow_tile.tscn" id="2_8syff"] +[ext_resource type="PackedScene" uid="uid://d4kee4ipw1k1q" path="res://scenes/entities/tiles/redirect_up_tile.tscn" id="2_hyvhe"] [ext_resource type="Script" uid="uid://cw7yc3i2lgcja" path="res://addons/pvzadventure/WaveEvent.cs" id="3_icaa5"] [ext_resource type="Script" uid="uid://7rptlb5qr3b6" path="res://addons/pvzadventure/WaveData.cs" id="4_kc7t2"] [ext_resource type="Script" uid="uid://dl12rj75tk2qi" path="res://addons/pvzadventure/RowSpawn.cs" id="5_66y5q"] @@ -281,7 +285,9 @@ wavePercentage = 0.5 standardWaveDelay = 30.0 initialWaveDelay = 20.0 reward = ExtResource("1_eqa0o") -forbiddenPlants = Array[String](["aloe", "spikeweed", "peashooter", "wallnut"]) -waves = [SubResource("Resource_c21si"), SubResource("Resource_icaa5"), SubResource("Resource_kc7t2"), SubResource("Resource_66y5q"), SubResource("Resource_tuvrx"), SubResource("Resource_t4nit"), SubResource("Resource_qx8xe"), SubResource("Resource_hyvhe"), SubResource("Resource_8syff"), SubResource("Resource_jfmww"), SubResource("Resource_vrqir"), SubResource("Resource_2seob"), SubResource("Resource_geil0"), SubResource("Resource_lxb1x"), SubResource("Resource_o5y12"), SubResource("Resource_diw66"), SubResource("Resource_pwwqn")] -initialScenes = Array[PackedScene]([null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]) +forbiddenPlants = Array[String](["garlic", "nerdus"]) +forbiddenTags = Array[String]([]) +prepickedPlants = Array[String]([]) +waves = Array[ExtResource("4_kc7t2")]([SubResource("Resource_c21si"), SubResource("Resource_icaa5"), SubResource("Resource_kc7t2"), SubResource("Resource_66y5q"), SubResource("Resource_tuvrx"), SubResource("Resource_t4nit"), SubResource("Resource_qx8xe"), SubResource("Resource_hyvhe"), SubResource("Resource_8syff"), SubResource("Resource_jfmww"), SubResource("Resource_vrqir"), SubResource("Resource_2seob"), SubResource("Resource_geil0"), SubResource("Resource_lxb1x"), SubResource("Resource_o5y12"), SubResource("Resource_diw66"), SubResource("Resource_pwwqn")]) +initialScenes = Array[PackedScene]([null, null, null, null, null, null, null, null, ExtResource("1_jfmww"), null, null, null, null, null, null, null, null, ExtResource("1_qx8xe"), null, null, null, null, null, null, null, null, ExtResource("2_8syff"), null, null, null, null, null, null, null, null, ExtResource("2_hyvhe"), null, null, null, null, null, null, null, null, ExtResource("1_jfmww")]) metadata/_custom_type_script = "uid://bximdujbkj2n4" diff --git a/assets/levels/win_test.tres b/assets/levels/win_test.tres index 7c662e7..8c622fd 100644 --- a/assets/levels/win_test.tres +++ b/assets/levels/win_test.tres @@ -38,5 +38,8 @@ wavePercentage = 0.0 standardWaveDelay = 20.0 initialWaveDelay = 10.0 reward = ExtResource("1_sw8bw") -waves = [SubResource("Resource_swlbc"), SubResource("Resource_pkoaj")] +forbiddenPlants = Array[String]([]) +forbiddenTags = Array[String]([]) +prepickedPlants = Array[String]([]) +waves = Array[ExtResource("3_mtsmf")]([SubResource("Resource_swlbc"), SubResource("Resource_pkoaj")]) initialScenes = Array[PackedScene]([null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]) diff --git a/assets/plants/Garlic.tres b/assets/plants/Garlic.tres index 9b19b7b..d821c21 100644 --- a/assets/plants/Garlic.tres +++ b/assets/plants/Garlic.tres @@ -13,6 +13,6 @@ DescriptionKey = "garlic_desc" Cost = 50.0 Scene = ExtResource("2_81n0p") ReloadTime = 7.5 -ReloadProgress = 0.67 +ReloadProgress = 0.0 Preview = ExtResource("1_datic") Order = 7 diff --git a/assets/plants/PotatoMine.tres b/assets/plants/PotatoMine.tres index 1abf969..825de86 100644 --- a/assets/plants/PotatoMine.tres +++ b/assets/plants/PotatoMine.tres @@ -13,6 +13,6 @@ DescriptionKey = "potatomine_desc" Cost = 25.0 Scene = ExtResource("2_ig2ti") ReloadTime = 25.0 -ReloadProgress = 0.9 +ReloadProgress = 0.0 Preview = ExtResource("1_xk2pg") Order = 3 diff --git a/assets/plants/Repeater.tres b/assets/plants/Repeater.tres new file mode 100644 index 0000000..85f96ca --- /dev/null +++ b/assets/plants/Repeater.tres @@ -0,0 +1,35 @@ +[gd_resource type="Resource" script_class="PlantResource" load_steps=10 format=3 uid="uid://b4r1687hg0rf5"] + +[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_6km43"] +[ext_resource type="Texture2D" uid="uid://dhf2opi0brx23" path="res://assets/sprites/gui/almanach/premium_field.tres" id="1_ormja"] +[ext_resource type="PackedScene" uid="uid://bb4ya5qx224ca" path="res://scenes/entities/plants/repeater.tscn" id="2_6km43"] +[ext_resource type="Texture2D" uid="uid://31jc2e7dijas" path="res://assets/sprites/gui/PremiumPlantCard.tres" id="2_8djti"] +[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/entities/PlantResource.cs" id="3_e606l"] +[ext_resource type="Script" uid="uid://3m7xks3xq3hl" path="res://scripts/gui/seedpackets/CustomSeedpacketFrame.cs" id="3_qnhmj"] + +[sub_resource type="LabelSettings" id="LabelSettings_2f3e1"] + +[sub_resource type="Resource" id="Resource_87lkl"] +script = ExtResource("3_qnhmj") +frame = ExtResource("2_8djti") +font = SubResource("LabelSettings_2f3e1") +almanachField = ExtResource("1_ormja") +metadata/_custom_type_script = "uid://3m7xks3xq3hl" + +[sub_resource type="AtlasTexture" id="AtlasTexture_qnsfo"] +atlas = ExtResource("1_6km43") +region = Rect2(604, 241, 45, 51) + +[resource] +script = ExtResource("3_e606l") +Layer = 1 +DontRegister = false +NameKey = "repeater" +DescriptionKey = "repeater_desc" +Cost = 175.0 +Scene = ExtResource("2_6km43") +ReloadTime = 5.0 +ReloadProgress = 0.0 +Preview = SubResource("AtlasTexture_qnsfo") +CustomFrame = SubResource("Resource_87lkl") +Order = 12 diff --git a/assets/sprites/atlases/atlas1.png b/assets/sprites/atlases/atlas1.png index 6027a0b..66ad649 100644 Binary files a/assets/sprites/atlases/atlas1.png and b/assets/sprites/atlases/atlas1.png differ diff --git a/project.godot b/project.godot index b39e007..96ed95b 100644 --- a/project.godot +++ b/project.godot @@ -196,11 +196,10 @@ cursor_right={ [internationalization] locale/translations=PackedStringArray("res://translations/plants.en.translation", "res://translations/plants.ru.translation", "res://translations/zombies.en.translation", "res://translations/zombies.ru.translation", "res://translations/gui.en.translation", "res://translations/gui.ru.translation", "res://translations/rewards.en.translation", "res://translations/rewards.ru.translation") -locale/test="en" [layer_names] -2d_physics/layer_1="Reserved" +2d_physics/layer_1="Structures" 2d_physics/layer_2="Plants Dummy" 2d_physics/layer_3="Plants True" 2d_physics/layer_4="Zombies Dummy" @@ -208,6 +207,7 @@ locale/test="en" 2d_physics/layer_6="Projectiles" 2d_physics/layer_7="FallLine" 2d_physics/layer_8="FallParticles" +2d_physics/layer_9="Tiles" [rendering] diff --git a/scenes/entities/Zombies/bucket_zombie.tscn b/scenes/entities/Zombies/bucket_zombie.tscn index 2982093..e8d6372 100644 --- a/scenes/entities/Zombies/bucket_zombie.tscn +++ b/scenes/entities/Zombies/bucket_zombie.tscn @@ -1,40 +1,772 @@ -[gd_scene load_steps=17 format=3 uid="uid://xu4i6tmkv00a"] +[gd_scene load_steps=71 format=3 uid="uid://xu4i6tmkv00a"] -[ext_resource type="PackedScene" uid="uid://hhjbqkjqpt7x" path="res://scenes/entities/Zombies/cone_zombie.tscn" id="1_mwqpo"] -[ext_resource type="Shader" uid="uid://btf4xhu31ln6n" path="res://assets/shaders/canvas_group_flash.gdshader" id="2_lea3a"] +[ext_resource type="Script" uid="uid://dildme6epx8l4" path="res://scripts/entities/zombies/RuntimeZombieData.cs" id="1_6aq6w"] [ext_resource type="Texture2D" uid="uid://ce04l60l6mhfk" path="res://assets/sprites/bucket1.tres" id="3_0nlp0"] -[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="3_xq7ta"] +[ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/particles/FallParticle.cs" id="4_1avwi"] [ext_resource type="Script" uid="uid://c3cfnrmnnuqms" path="res://addons/floatmodifiers/FloatModifiers.cs" id="4_1s2fn"] [ext_resource type="Texture2D" uid="uid://ikk4jp7mvm3s" path="res://assets/sprites/bucket2.tres" id="4_xx7fu"] [ext_resource type="AudioStream" uid="uid://bu1egfsyplpx4" path="res://assets/audio/sfx/metalhit_generic.tres" id="5_lt6ps"] [ext_resource type="Texture2D" uid="uid://cmmpfi8ug43l2" path="res://assets/sprites/bucket3.tres" id="5_v1iwd"] +[ext_resource type="Script" uid="uid://dau0tfmlfiqmo" path="res://scripts/entities/EntityHPObserver.cs" id="5_wndvs"] [ext_resource type="AudioStream" uid="uid://w0qfwds4o3ti" path="res://assets/audio/sfx/hit_generic.tres" id="6_kedip"] [ext_resource type="Texture2D" uid="uid://dacgbwohpmeed" path="res://assets/sprites/zombies/basic.png" id="6_lea3a"] +[ext_resource type="Script" uid="uid://bbw848msxb4re" path="res://scripts/entities/DegradingSprite.cs" id="8_jdtg8"] +[ext_resource type="Texture2D" uid="uid://dri70dxyks7xh" path="res://assets/sprites/zombies/hobo.png" id="11_5swed"] +[ext_resource type="AnimationLibrary" uid="uid://ceb3khu7rwgy8" path="res://assets/animations/zombies/basic.res" id="12_gjchu"] +[ext_resource type="Script" uid="uid://dw7v3s4kbu7ma" path="res://scripts/entities/AnimationStatistics.cs" id="13_lbhkf"] +[ext_resource type="Script" uid="uid://dqyony6jxt2p0" path="res://scripts/entities/zombies/EatBox.cs" id="14_xxv4d"] +[ext_resource type="AnimationNodeStateMachine" uid="uid://dj0blope85bg7" path="res://assets/animations/zombies/basic_zombie_tree.tres" id="16_bufgc"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="17_3hgrb"] +[ext_resource type="Script" uid="uid://7hdj2k14lfe4" path="res://scripts/entities/zombies/ZombieMover.cs" id="18_tffdk"] +[ext_resource type="Script" uid="uid://cnn0ymuhypdff" path="res://scripts/audio/ChannelPlaylist.cs" id="19_k2y7k"] +[ext_resource type="Script" uid="uid://fd4im1fmwc5n" path="res://scripts/entities/Armor.cs" id="22_aasgd"] +[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="23_rgojs"] +[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="24_3ui6x"] +[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="24_wndvs"] +[ext_resource type="AudioStream" uid="uid://bg76miyscfvhu" path="res://assets/audio/sfx/groan.tres" id="25_ix7xe"] +[ext_resource type="Script" uid="uid://b8r6fxsfjdo3a" path="res://scripts/audio/EffectBasedPlayer.cs" id="26_7018m"] +[ext_resource type="Resource" uid="uid://dsg1vjx76ifgu" path="res://assets/effects/GarlicEffect.tres" id="27_wd16f"] +[ext_resource type="Resource" uid="uid://7uj0oe656jfx" path="res://assets/effects/SnowSlow.tres" id="28_b1su1"] +[ext_resource type="AudioStream" uid="uid://dt13iugnnx4op" path="res://assets/audio/sfx/yuck_generic.tres" id="29_si5j4"] +[ext_resource type="AudioStream" uid="uid://bjotp63arocci" path="res://assets/audio/sfx/frozen.mp3" id="30_qu32w"] +[ext_resource type="Script" uid="uid://c1x4n4nqyq72f" path="res://scripts/audio/ChannelSettings.cs" id="31_lml24"] +[ext_resource type="Script" uid="uid://dk32ln8c2574d" path="res://scripts/entities/zombies/ZombieKillHandler.cs" id="32_m7hhr"] +[ext_resource type="Material" uid="uid://jr0vpg030jqv" path="res://assets/ZombieMaterial.tres" id="34_jdtg8"] -[sub_resource type="ShaderMaterial" id="ShaderMaterial_03nuu"] -resource_local_to_scene = true -shader = ExtResource("2_lea3a") -shader_parameter/FLASH_COLOR = Color(1, 0.709804, 0.439216, 0.5) -shader_parameter/HIGHLIGHT_COLOR = Color(1, 0.709804, 0.439216, 0.5) -shader_parameter/blend = 0.0 -shader_parameter/selected = false +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_wn68q"] +tip_nodepath = NodePath("Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 17 +joint_data/0/bone2d_node = NodePath("Butt/Body/LeftUpperArm/LeftLowerArm") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = true +joint_data/0/constraint_angle_min = 0.0 +joint_data/0/constraint_angle_max = 90.0 +joint_data/0/constraint_angle_invert = false +joint_data/0/constraint_in_localspace = true +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 16 +joint_data/1/bone2d_node = NodePath("Butt/Body/LeftUpperArm") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = false +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false -[sub_resource type="ShaderMaterial" id="ShaderMaterial_1iamf"] -resource_local_to_scene = true -shader = ExtResource("3_xq7ta") -shader_parameter/FLASH_COLOR = Color(1, 0.709804, 0.439216, 0.5) -shader_parameter/HIGHLIGHT_COLOR = Color(1, 0.709804, 0.439216, 0.5) -shader_parameter/selected = false -shader_parameter/blend = 0.0 +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_x5uj2"] +tip_nodepath = NodePath("Butt/Body/RightUpperArm/RightLowerArm/RightHand") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 8 +joint_data/0/bone2d_node = NodePath("Butt/Body/RightUpperArm") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = false +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 9 +joint_data/1/bone2d_node = NodePath("Butt/Body/RightUpperArm/RightLowerArm") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = true +joint_data/1/constraint_angle_min = 0.0 +joint_data/1/constraint_angle_max = 90.0 +joint_data/1/constraint_angle_invert = false +joint_data/1/constraint_in_localspace = true +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false + +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_vcc72"] +tip_nodepath = NodePath("Butt/RightUpperLeg/RightLowerLeg/RightFoot") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 1 +joint_data/0/bone2d_node = NodePath("Butt/RightUpperLeg") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = true +joint_data/0/constraint_angle_min = -90.0 +joint_data/0/constraint_angle_max = 90.0 +joint_data/0/constraint_angle_invert = true +joint_data/0/constraint_in_localspace = true +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 2 +joint_data/1/bone2d_node = NodePath("Butt/RightUpperLeg/RightLowerLeg") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = true +joint_data/1/constraint_angle_min = 0.0 +joint_data/1/constraint_angle_max = 160.0 +joint_data/1/constraint_angle_invert = false +joint_data/1/constraint_in_localspace = true +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false + +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_kto0i"] +tip_nodepath = NodePath("Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 4 +joint_data/0/bone2d_node = NodePath("Butt/LeftUpperLeg") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = true +joint_data/0/constraint_angle_min = -90.0 +joint_data/0/constraint_angle_max = 90.0 +joint_data/0/constraint_angle_invert = true +joint_data/0/constraint_in_localspace = true +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 5 +joint_data/1/bone2d_node = NodePath("Butt/LeftUpperLeg/LeftLowerLeg") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = true +joint_data/1/constraint_angle_min = -90.0 +joint_data/1/constraint_angle_max = 0.0 +joint_data/1/constraint_angle_invert = true +joint_data/1/constraint_in_localspace = true +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false + +[sub_resource type="SkeletonModificationStack2D" id="SkeletonModificationStack2D_wn68q"] +modification_count = 4 +modifications/0 = SubResource("SkeletonModification2DCCDIK_wn68q") +modifications/1 = SubResource("SkeletonModification2DCCDIK_x5uj2") +modifications/2 = SubResource("SkeletonModification2DCCDIK_vcc72") +modifications/3 = SubResource("SkeletonModification2DCCDIK_kto0i") + +[sub_resource type="AtlasTexture" id="AtlasTexture_jvn5w"] +atlas = ExtResource("6_lea3a") +region = Rect2(15, 30, 20, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vmdbp"] +atlas = ExtResource("6_lea3a") +region = Rect2(64, 44, 10, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x1oyw"] +atlas = ExtResource("6_lea3a") +region = Rect2(93, 50, 17, 9) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vjx3c"] +atlas = ExtResource("6_lea3a") +region = Rect2(79, 44, 10, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_f31xd"] +atlas = ExtResource("6_lea3a") +region = Rect2(47, 33, 8, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_od8jf"] +atlas = ExtResource("6_lea3a") +region = Rect2(59, 33, 7, 10) + +[sub_resource type="AtlasTexture" id="AtlasTexture_p4711"] +atlas = ExtResource("6_lea3a") +region = Rect2(71, 30, 19, 13) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1bk2b"] +atlas = ExtResource("6_lea3a") +region = Rect2(12, 43, 6, 18) + +[sub_resource type="AtlasTexture" id="AtlasTexture_y06yv"] +atlas = ExtResource("6_lea3a") +region = Rect2(36, 50, 9, 11) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lu8go"] +atlas = ExtResource("6_lea3a") +region = Rect2(22, 45, 8, 15) + +[sub_resource type="AtlasTexture" id="AtlasTexture_cdq7v"] +atlas = ExtResource("6_lea3a") +region = Rect2(93, 8, 29, 39) + +[sub_resource type="AtlasTexture" id="AtlasTexture_e7wc3"] +atlas = ExtResource("6_lea3a") +region = Rect2(72, 2, 13, 26) + +[sub_resource type="AtlasTexture" id="AtlasTexture_wn68q"] +atlas = ExtResource("6_lea3a") +region = Rect2(36, 0, 32, 29) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vcc72"] +atlas = ExtResource("6_lea3a") +region = Rect2(93, 3, 2, 3) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kto0i"] +atlas = ExtResource("6_lea3a") +region = Rect2(105, 2, 3, 4) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x5uj2"] +atlas = ExtResource("6_lea3a") +region = Rect2(15, 17, 17, 6) + +[sub_resource type="CircleShape2D" id="CircleShape2D_dn8ha"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_67t4t"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_djocr"] +atlas = ExtResource("6_lea3a") +region = Rect2(2, 7, 6, 19) + +[sub_resource type="AtlasTexture" id="AtlasTexture_auqeq"] +atlas = ExtResource("6_lea3a") +region = Rect2(0, 32, 9, 15) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vlvtp"] +atlas = ExtResource("11_5swed") +region = Rect2(55, 0, 9, 10) + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ccrjo"] +radius = 3.00026 +height = 16.007 [sub_resource type="AtlasTexture" id="AtlasTexture_wfem3"] atlas = ExtResource("6_lea3a") region = Rect2(24, 2, 9, 9) -[sub_resource type="AtlasTexture" id="AtlasTexture_auqeq"] +[sub_resource type="AtlasTexture" id="AtlasTexture_4q1fo"] atlas = ExtResource("6_lea3a") region = Rect2(0, 32, 9, 15) +[sub_resource type="Animation" id="Animation_vn3j1"] +resource_name = "RESET" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-2, 14)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm:rotation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand:position") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, 13)] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand:rotation") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("Zombie/Butt/Body/LeftUpperArm:position") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, -20)] +} +tracks/5/type = "value" +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/path = NodePath("Zombie/Butt/Body/LeftUpperArm:rotation") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/6/type = "value" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("Zombie/Butt/Body/Head/LeftEye:position") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-4, -9)] +} +tracks/7/type = "value" +tracks/7/imported = false +tracks/7/enabled = true +tracks/7/path = NodePath("Zombie/Butt/Body/Head/LeftEye:rotation") +tracks/7/interp = 1 +tracks/7/loop_wrap = true +tracks/7/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/8/type = "value" +tracks/8/imported = false +tracks/8/enabled = true +tracks/8/path = NodePath("Zombie/Butt/Body/Head/RightEye:position") +tracks/8/interp = 1 +tracks/8/loop_wrap = true +tracks/8/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-16, -8)] +} +tracks/9/type = "value" +tracks/9/imported = false +tracks/9/enabled = true +tracks/9/path = NodePath("Zombie/Butt/Body/Head/RightEye:rotation") +tracks/9/interp = 1 +tracks/9/loop_wrap = true +tracks/9/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/10/type = "value" +tracks/10/imported = false +tracks/10/enabled = true +tracks/10/path = NodePath("Zombie/Butt/Body/Head/Jaw:position") +tracks/10/interp = 1 +tracks/10/loop_wrap = true +tracks/10/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-3, 3)] +} +tracks/11/type = "value" +tracks/11/imported = false +tracks/11/enabled = true +tracks/11/path = NodePath("Zombie/Butt/Body/Head/Jaw:rotation") +tracks/11/interp = 1 +tracks/11/loop_wrap = true +tracks/11/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/12/type = "value" +tracks/12/imported = false +tracks/12/enabled = true +tracks/12/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand:position") +tracks/12/interp = 1 +tracks/12/loop_wrap = true +tracks/12/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, 13)] +} +tracks/13/type = "value" +tracks/13/imported = false +tracks/13/enabled = true +tracks/13/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand:rotation") +tracks/13/interp = 1 +tracks/13/loop_wrap = true +tracks/13/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/14/type = "value" +tracks/14/imported = false +tracks/14/enabled = true +tracks/14/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm:position") +tracks/14/interp = 1 +tracks/14/loop_wrap = true +tracks/14/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-2, 15)] +} +tracks/15/type = "value" +tracks/15/imported = false +tracks/15/enabled = true +tracks/15/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm:rotation") +tracks/15/interp = 1 +tracks/15/loop_wrap = true +tracks/15/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/16/type = "value" +tracks/16/imported = false +tracks/16/enabled = true +tracks/16/path = NodePath("Zombie/Butt/Body/RightUpperArm:position") +tracks/16/interp = 1 +tracks/16/loop_wrap = true +tracks/16/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-14, -23)] +} +tracks/17/type = "value" +tracks/17/imported = false +tracks/17/enabled = true +tracks/17/path = NodePath("Zombie/Butt/Body/RightUpperArm:rotation") +tracks/17/interp = 1 +tracks/17/loop_wrap = true +tracks/17/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/18/type = "value" +tracks/18/imported = false +tracks/18/enabled = true +tracks/18/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot:position") +tracks/18/interp = 1 +tracks/18/loop_wrap = true +tracks/18/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(6, 10)] +} +tracks/19/type = "value" +tracks/19/imported = false +tracks/19/enabled = true +tracks/19/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot:rotation") +tracks/19/interp = 1 +tracks/19/loop_wrap = true +tracks/19/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/20/type = "value" +tracks/20/imported = false +tracks/20/enabled = true +tracks/20/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg:position") +tracks/20/interp = 1 +tracks/20/loop_wrap = true +tracks/20/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, 13)] +} +tracks/21/type = "value" +tracks/21/imported = false +tracks/21/enabled = true +tracks/21/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg:rotation") +tracks/21/interp = 1 +tracks/21/loop_wrap = true +tracks/21/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/22/type = "value" +tracks/22/imported = false +tracks/22/enabled = true +tracks/22/path = NodePath("Zombie/Butt/LeftUpperLeg:position") +tracks/22/interp = 1 +tracks/22/loop_wrap = true +tracks/22/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(6, 4)] +} +tracks/23/type = "value" +tracks/23/imported = false +tracks/23/enabled = true +tracks/23/path = NodePath("Zombie/Butt/LeftUpperLeg:rotation") +tracks/23/interp = 1 +tracks/23/loop_wrap = true +tracks/23/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/24/type = "value" +tracks/24/imported = false +tracks/24/enabled = true +tracks/24/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot:position") +tracks/24/interp = 1 +tracks/24/loop_wrap = true +tracks/24/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-2, 14)] +} +tracks/25/type = "value" +tracks/25/imported = false +tracks/25/enabled = true +tracks/25/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot:rotation") +tracks/25/interp = 1 +tracks/25/loop_wrap = true +tracks/25/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/26/type = "value" +tracks/26/imported = false +tracks/26/enabled = true +tracks/26/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg:position") +tracks/26/interp = 1 +tracks/26/loop_wrap = true +tracks/26/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-2, 12)] +} +tracks/27/type = "value" +tracks/27/imported = false +tracks/27/enabled = true +tracks/27/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg:rotation") +tracks/27/interp = 1 +tracks/27/loop_wrap = true +tracks/27/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/28/type = "value" +tracks/28/imported = false +tracks/28/enabled = true +tracks/28/path = NodePath("Zombie/Butt/RightUpperLeg:position") +tracks/28/interp = 1 +tracks/28/loop_wrap = true +tracks/28/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-6, 3)] +} +tracks/29/type = "value" +tracks/29/imported = false +tracks/29/enabled = true +tracks/29/path = NodePath("Zombie/Butt/RightUpperLeg:rotation") +tracks/29/interp = 1 +tracks/29/loop_wrap = true +tracks/29/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/30/type = "value" +tracks/30/imported = false +tracks/30/enabled = true +tracks/30/path = NodePath("Zombie/Butt:position") +tracks/30/interp = 1 +tracks/30/loop_wrap = true +tracks/30/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(5, -35)] +} +tracks/31/type = "value" +tracks/31/imported = false +tracks/31/enabled = true +tracks/31/path = NodePath("Zombie/Butt:rotation") +tracks/31/interp = 1 +tracks/31/loop_wrap = true +tracks/31/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/32/type = "value" +tracks/32/imported = false +tracks/32/enabled = true +tracks/32/path = NodePath("Zombie/Butt/Body:position") +tracks/32/interp = 1 +tracks/32/loop_wrap = true +tracks/32/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(1, -2)] +} +tracks/33/type = "value" +tracks/33/imported = false +tracks/33/enabled = true +tracks/33/path = NodePath("Zombie/Butt/Body:rotation") +tracks/33/interp = 1 +tracks/33/loop_wrap = true +tracks/33/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/34/type = "value" +tracks/34/imported = false +tracks/34/enabled = true +tracks/34/path = NodePath("Zombie:position") +tracks/34/interp = 1 +tracks/34/loop_wrap = true +tracks/34/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(0, 0)] +} +tracks/35/type = "value" +tracks/35/imported = false +tracks/35/enabled = true +tracks/35/path = NodePath("Zombie:rotation") +tracks/35/interp = 1 +tracks/35/loop_wrap = true +tracks/35/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/36/type = "value" +tracks/36/imported = false +tracks/36/enabled = true +tracks/36/path = NodePath("Zombie/Butt/Body/Head:position") +tracks/36/interp = 1 +tracks/36/loop_wrap = true +tracks/36/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-10, -25)] +} +tracks/37/type = "value" +tracks/37/imported = false +tracks/37/enabled = true +tracks/37/path = NodePath("Zombie/Butt/Body/Head:rotation") +tracks/37/interp = 1 +tracks/37/loop_wrap = true +tracks/37/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/38/type = "value" +tracks/38/imported = false +tracks/38/enabled = true +tracks/38/path = NodePath("Zombie/Butt/Body/Head:visible") +tracks/38/interp = 1 +tracks/38/loop_wrap = true +tracks/38/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/39/type = "value" +tracks/39/imported = false +tracks/39/enabled = true +tracks/39/path = NodePath("Zombie/Butt/Body/Head/TrashcanLid:position") +tracks/39/interp = 1 +tracks/39/loop_wrap = true +tracks/39/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-0.0022974, -17.0131)] +} +tracks/40/type = "value" +tracks/40/imported = false +tracks/40/enabled = true +tracks/40/path = NodePath("Zombie/Butt/Body/Head/TrashcanLid:rotation") +tracks/40/interp = 1 +tracks/40/loop_wrap = true +tracks/40/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/41/type = "value" +tracks/41/imported = false +tracks/41/enabled = true +tracks/41/path = NodePath("Zombie/Butt/Body/Head/TrashcanLid:visible") +tracks/41/interp = 1 +tracks/41/loop_wrap = true +tracks/41/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} +tracks/42/type = "value" +tracks/42/imported = false +tracks/42/enabled = true +tracks/42/path = NodePath("Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm/Left_Hand:texture") +tracks/42/interp = 1 +tracks/42/loop_wrap = true +tracks/42/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [SubResource("AtlasTexture_vlvtp")] +} +tracks/43/type = "value" +tracks/43/imported = false +tracks/43/enabled = true +tracks/43/path = NodePath("Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm/Left_Hand:offset") +tracks/43/interp = 1 +tracks/43/loop_wrap = true +tracks/43/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-4, -1)] +} +tracks/44/type = "value" +tracks/44/imported = false +tracks/44/enabled = true +tracks/44/path = NodePath("Zombie/Butt/Body/Tie:scale") +tracks/44/interp = 1 +tracks/44/loop_wrap = true +tracks/44/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(1, 1)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_x5uj2"] +_data = { +&"RESET": SubResource("Animation_vn3j1") +} + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_hxyad"] +size = Vector2(26, 48) + [sub_resource type="Resource" id="Resource_lea3a"] resource_local_to_scene = true script = ExtResource("4_1s2fn") @@ -42,6 +774,18 @@ flat_value = 5.0 percentage_value = 0.0 mult_value = 1.0 +[sub_resource type="RectangleShape2D" id="RectangleShape2D_r4ug6"] +size = Vector2(16, 48) + +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_2q05d"] + +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_ccrjo"] +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_2q05d") +nodes/TimeScale/position = Vector2(60, 120) +nodes/Tree/node = ExtResource("16_bufgc") +nodes/Tree/position = Vector2(-240, 120) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + [sub_resource type="Resource" id="Resource_v1iwd"] resource_local_to_scene = true script = ExtResource("4_1s2fn") @@ -49,131 +793,487 @@ flat_value = 0.2 percentage_value = 0.0 mult_value = 1.0 -[node name="BucketZombie" instance=ExtResource("1_mwqpo")] +[sub_resource type="Resource" id="Resource_dn8ha"] +script = ExtResource("31_lml24") +restartTreshold = -1.0 +metadata/_custom_type_script = "uid://c1x4n4nqyq72f" -[node name="CanvasGroup" parent="." index="0"] -material = SubResource("ShaderMaterial_03nuu") +[node name="BucketZombie" type="Node2D" node_paths=PackedStringArray("_armor", "_player", "_tree")] +y_sort_enabled = true +script = ExtResource("1_6aq6w") +_armor = NodePath("Armor") +MaxHP = 100.0 +_player = NodePath("CanvasGroup/basic_zombie_walk/AnimationPlayer") +_tree = NodePath("AnimationTree") +metadata/_edit_vertical_guides_ = [-159.0] -[node name="Zombie" parent="CanvasGroup/basic_zombie_walk" index="0"] -use_parent_material = false +[node name="CanvasGroup" type="CanvasGroup" parent="."] +material = ExtResource("34_jdtg8") -[node name="Butt" parent="CanvasGroup/basic_zombie_walk/Zombie" index="0"] -use_parent_material = false +[node name="basic_zombie_walk" type="Node2D" parent="CanvasGroup"] + +[node name="Zombie" type="Skeleton2D" parent="CanvasGroup/basic_zombie_walk"] +modification_stack = SubResource("SkeletonModificationStack2D_wn68q") + +[node name="Butt" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie"] +position = Vector2(5, -35) scale = Vector2(0.999912, 0.999912) +rest = Transform2D(1, 0, 0, 1, 5, -35) +editor_settings/show_bone_gizmo = false -[node name="Butt" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="0"] -use_parent_material = false - -[node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"] -use_parent_material = false -scale = Vector2(0.999829, 0.999829) - -[node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"] -scale = Vector2(0.999834, 0.999834) - -[node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] -scale = Vector2(0.999831, 0.999831) - -[node name="LeftUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="2"] -use_parent_material = false -scale = Vector2(0.999831, 0.999831) - -[node name="LeftLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="1"] -scale = Vector2(0.999831, 0.999831) - -[node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] -scale = Vector2(0.99983, 0.99983) - -[node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"] -use_parent_material = false -scale = Vector2(0.999832, 0.999832) - -[node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"] -use_parent_material = false -scale = Vector2(0.999827, 0.999827) - -[node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] -scale = Vector2(0.999821, 0.999821) - -[node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"] -scale = Vector2(0.999827, 0.999827) - -[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] -rotation = 0.0622776 -skew = -0.000231266 - -[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3"] -scale = Vector2(0.999831, 0.999831) - -[node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"] -position = Vector2(-16, -8) - -[node name="Left_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="1"] -position = Vector2(-4, -9) - -[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"] -position = Vector2(-3.00076, 2.9987) -rotation = 0.00604386 -scale = Vector2(0.999828, 0.999828) - -[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] -scale = Vector2(0.999828, 0.999828) - -[node name="Hat" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="4"] -position = Vector2(-6, -8) - -[node name="Sprite" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Hat" index="0"] -material = SubResource("ShaderMaterial_1iamf") -position = Vector2(0.994479, -10.0058) -texture = ExtResource("3_0nlp0") -degradationStages = Array[Texture]([ExtResource("3_0nlp0"), ExtResource("4_xx7fu"), ExtResource("5_v1iwd")]) - -[node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="4"] -scale = Vector2(0.999824, 0.999824) - -[node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"] -rotation = 0.0585546 -scale = Vector2(0.999996, 0.999996) - -[node name="Left_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm" index="0"] -show_behind_parent = false -position = Vector2(-0.99983, 12.9978) -rotation = -0.0258424 -scale = Vector2(0.99965, 0.99965) - -[node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"] -scale = Vector2(0.999826, 0.999826) - -[node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"] -scale = Vector2(0.99982, 0.99982) - -[node name="Left_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand" index="0"] -texture = SubResource("AtlasTexture_wfem3") +[node name="Butt" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] +texture = SubResource("AtlasTexture_jvn5w") centered = false -offset = Vector2(-4, 0) +offset = Vector2(-10, -3) metadata/_edit_lock_ = true -[node name="Left_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="1"] +[node name="RightUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] +position = Vector2(-6, 3) +scale = Vector2(0.999833, 0.999833) +rest = Transform2D(1, 0, 0, 1, -6, 3) +editor_settings/show_bone_gizmo = false + +[node name="Right_Upper_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg"] +texture = SubResource("AtlasTexture_vmdbp") +centered = false +offset = Vector2(-6, -2) +metadata/_edit_lock_ = true + +[node name="RightLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg"] +position = Vector2(-2, 12) +scale = Vector2(0.999834, 0.999834) +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.99983, 0.99983) +rest = Transform2D(1, 0, 0, 1, -2, 14) +auto_calculate_length_and_angle = false +length = 12.0 +bone_angle = 0.0 +editor_settings/show_bone_gizmo = false + +[node name="Right_Foot" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot"] +texture = SubResource("AtlasTexture_x1oyw") +centered = false +offset = Vector2(-4, -3) +metadata/_edit_lock_ = true + +[node name="Right_Lower_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg"] +position = Vector2(-18, -2) +texture = SubResource("AtlasTexture_vjx3c") +centered = false +offset = Vector2(12, 1) +metadata/_edit_lock_ = true + +[node name="LeftUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] +position = Vector2(6, 4) +scale = Vector2(0.999835, 0.999835) +rest = Transform2D(1, 0, 0, 1, 6, 4) +editor_settings/show_bone_gizmo = false + +[node name="Left_Upper_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg"] +texture = SubResource("AtlasTexture_f31xd") +centered = false +offset = Vector2(-4, -2) +metadata/_edit_lock_ = true + +[node name="LeftLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg"] +position = Vector2(-1, 13) +scale = Vector2(0.999838, 0.999838) +rest = Transform2D(1, 0, 0, 1, -1, 13) +editor_settings/show_bone_gizmo = false + +[node name="Left_Lower_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg"] +texture = SubResource("AtlasTexture_od8jf") +centered = false +offset = Vector2(-1, 0) +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.999832, 0.999832) +rest = Transform2D(1, 0, 0, 1, 6, 10) +auto_calculate_length_and_angle = false +length = 12.0 +bone_angle = 160.0 +editor_settings/show_bone_gizmo = false + +[node name="Left_Foot" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot"] +texture = SubResource("AtlasTexture_p4711") +centered = false +offset = Vector2(-14, -3) +metadata/_edit_lock_ = true + +[node name="Body" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] +position = Vector2(1, -2) +scale = Vector2(0.999829, 0.999829) +rest = Transform2D(1, 0, 0, 1, 1, -2) +editor_settings/show_bone_gizmo = false + +[node name="RightUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +position = Vector2(-14, -23) +scale = Vector2(0.999827, 0.999827) +rest = Transform2D(1, 0, 0, 1, -14, -23) +editor_settings/show_bone_gizmo = false + +[node name="Right_Upper_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"] +texture = SubResource("AtlasTexture_1bk2b") +centered = false +offset = Vector2(-4, -2) +metadata/_edit_lock_ = true + +[node name="RightLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"] +position = Vector2(-2, 15) +scale = Vector2(0.999822, 0.999822) +rest = Transform2D(1, 0, 0, 1, -2, 15) +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.99983, 0.99983) +rest = Transform2D(1, 0, 0, 1, -1, 13) +auto_calculate_length_and_angle = false +length = 8.0 +bone_angle = 90.0 +editor_settings/show_bone_gizmo = false + +[node name="Right_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand"] +texture = SubResource("AtlasTexture_y06yv") +centered = false +offset = Vector2(-4, -2) +metadata/_edit_lock_ = true + +[node name="Right_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm"] +texture = SubResource("AtlasTexture_lu8go") +centered = false +offset = Vector2(-5, -1) +metadata/_edit_lock_ = true + +[node name="Body" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +rotation = 0.00163735 +texture = SubResource("AtlasTexture_cdq7v") +centered = false +offset = Vector2(-15, -27) +metadata/_edit_lock_ = true + +[node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +position = Vector2(-9, -21) +rotation = -0.0699613 +skew = -0.000234127 +rest = Transform2D(1, 0, 0, 1, -9, -21) +auto_calculate_length_and_angle = false +length = 24.0 +bone_angle = 100.0 +editor_settings/show_bone_gizmo = false + +[node name="Tie" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Tie"] +texture = SubResource("AtlasTexture_e7wc3") +centered = false +offset = Vector2(-10, -1) +metadata/_edit_lock_ = true + +[node name="Head" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +position = Vector2(-10, -25) +scale = Vector2(0.999832, 0.999832) +rest = Transform2D(1, 0, 0, 1, -10, -25) +editor_settings/show_bone_gizmo = false + +[node name="HeadParticle" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" node_paths=PackedStringArray("data")] +collision_layer = 128 +collision_mask = 64 +freeze = true +script = ExtResource("4_1avwi") +data = NodePath("../../../../../../..") +maxAngle = 45.0 +minTorque = -45.0 +maxTorque = 45.0 +Impulse = 100.0 + +[node name="Head" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle"] +texture = SubResource("AtlasTexture_wn68q") +centered = false +offset = Vector2(-20, -24) +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) +texture = SubResource("AtlasTexture_vcc72") +centered = false +offset = Vector2(-2, -2) +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) +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(-2.69782, 2.27068) +rotation = -0.00688613 +scale = Vector2(0.99983, 0.99983) +texture = SubResource("AtlasTexture_x5uj2") +centered = false +offset = Vector2(-12, -2) +metadata/_edit_lock_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle"] +position = Vector2(-4.58496, -8.21035) +shape = SubResource("CircleShape2D_dn8ha") + +[node name="Observer" type="Node" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle" node_paths=PackedStringArray("_observedEntity")] +script = ExtResource("5_wndvs") +_threshold = 0.0 +_observedEntity = NodePath("../../../../../../../..") + +[node name="Jaw" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] +position = Vector2(-3, 3) +scale = Vector2(0.99983, 0.99983) +rest = Transform2D(1, 0, 0, 1, -3, 3) +auto_calculate_length_and_angle = false +length = 11.0 +bone_angle = 180.0 +editor_settings/show_bone_gizmo = false + +[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Jaw"] +remote_path = NodePath("../../HeadParticle/Head/Jaw") + +[node name="RightEye" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] +position = Vector2(-16, -8) +rest = Transform2D(1, 0, 0, 1, -16, -8) +auto_calculate_length_and_angle = false +length = 2.0 +bone_angle = 180.0 +editor_settings/show_bone_gizmo = false + +[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/RightEye"] +remote_path = NodePath("../../HeadParticle/Head/Right_Eye") + +[node name="LeftEye" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] +position = Vector2(-4, -9) +rest = Transform2D(1, 0, 0, 1, -4, -9) +auto_calculate_length_and_angle = false +length = 2.0 +bone_angle = 180.0 +editor_settings/show_bone_gizmo = false + +[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/LeftEye"] +remote_path = NodePath("../../HeadParticle/Head/Left_Eye") + +[node name="Hat" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" node_paths=PackedStringArray("data")] +position = Vector2(-6, -8) +collision_layer = 128 +collision_mask = 64 +mass = 0.5 +center_of_mass_mode = 1 +freeze = true +script = ExtResource("4_1avwi") +data = NodePath("../../../../../../..") +maxAngle = 45.0 +minTorque = -45.0 +maxTorque = 45.0 +Impulse = 100.0 + +[node name="Sprite" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Hat" node_paths=PackedStringArray("armor")] +material = ExtResource("24_wndvs") +position = Vector2(0.994479, -10.0058) +texture = ExtResource("3_0nlp0") +script = ExtResource("8_jdtg8") +armor = NodePath("../../../../../../../../Armor") +degradationStages = Array[Texture]([ExtResource("3_0nlp0"), ExtResource("4_xx7fu"), ExtResource("5_v1iwd")]) +thresholdPercentage = Array[float]([1.0, 0.667, 0.333]) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Hat"] +position = Vector2(1, -6) +shape = SubResource("CircleShape2D_67t4t") + +[node name="LeftUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +position = Vector2(-1, -20) +scale = Vector2(0.999825, 0.999825) +rest = Transform2D(1, 0, 0, 1, -1, -20) +editor_settings/show_bone_gizmo = false + +[node name="Left_Upper_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm"] +position = Vector2(-37, 10) +texture = SubResource("AtlasTexture_djocr") +centered = false +offset = Vector2(33, -12) +metadata/_edit_lock_ = true + +[node name="HandProjectile" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" node_paths=PackedStringArray("data")] +position = Vector2(-2, 14) +collision_layer = 128 +collision_mask = 64 +freeze = true +script = ExtResource("4_1avwi") +data = NodePath("../../../../../../..") +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.0380849 +scale = Vector2(1, 1) texture = SubResource("AtlasTexture_auqeq") centered = false offset = Vector2(-5, 0) metadata/_edit_lock_ = true -[node name="Eatbox" parent="." index="2"] +[node name="Left_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm"] +position = Vector2(-0.999829, 12.9978) +rotation = -0.126472 +scale = Vector2(0.999657, 0.999657) +texture = SubResource("AtlasTexture_vlvtp") +centered = false +offset = Vector2(-4, -1) +metadata/_edit_lock_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"] +position = Vector2(-0.00104554, 13.0063) +shape = SubResource("CapsuleShape2D_ccrjo") + +[node name="Observer" type="Node" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" node_paths=PackedStringArray("_observedEntity")] +script = ExtResource("5_wndvs") +_observedEntity = NodePath("../../../../../../../..") + +[node name="LeftLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm"] +position = Vector2(-2, 14) +scale = Vector2(0.99983, 0.99983) +rest = Transform2D(1, 0, 0, 1, -2, 14) +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.999827, 0.999827) +rest = Transform2D(1, 0, 0, 1, -1, 13) +auto_calculate_length_and_angle = false +length = 6.0 +bone_angle = 90.0 +editor_settings/show_bone_gizmo = false + +[node name="Left_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand"] +texture = SubResource("AtlasTexture_wfem3") +centered = false +offset = Vector2(-4, 0) +metadata/_edit_lock_ = true + +[node name="Left_Hand_Remote" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand"] +remote_path = NodePath("../../../HandProjectile/Left_Lower_Arm/Left_Hand") + +[node name="Left_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm"] +texture = SubResource("AtlasTexture_4q1fo") +centered = false +offset = Vector2(-5, 0) +metadata/_edit_lock_ = true + +[node name="Left_Lower_Arm_Remote" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm"] +scale = Vector2(1.00017, 1.00017) +remote_path = NodePath("../../HandProjectile/Left_Lower_Arm") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="CanvasGroup/basic_zombie_walk"] +libraries = { +&"": SubResource("AnimationLibrary_x5uj2"), +&"basic": ExtResource("12_gjchu") +} + +[node name="EatingStatistics" type="Node" parent="CanvasGroup/basic_zombie_walk/AnimationPlayer"] +script = ExtResource("13_lbhkf") +animationName = "basic/eating" +trackToFind = "../../Eatbox" + +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 8 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] +position = Vector2(4, -24) +shape = SubResource("RectangleShape2D_hxyad") + +[node name="Eatbox" type="Area2D" parent="."] +collision_layer = 0 +collision_mask = 2 +script = ExtResource("14_xxv4d") _damage = SubResource("Resource_lea3a") -[node name="Mover" parent="." index="4"] -_speed = SubResource("Resource_v1iwd") +[node name="CollisionShape2D" type="CollisionShape2D" parent="Eatbox"] +position = Vector2(-10, -24) +shape = SubResource("RectangleShape2D_r4ug6") -[node name="HitPlayer" parent="." index="5"] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] +root_node = NodePath("../CanvasGroup/basic_zombie_walk") +tree_root = SubResource("AnimationNodeBlendTree_ccrjo") +advance_expression_base_node = NodePath("../Eatbox") +anim_player = NodePath("../CanvasGroup/basic_zombie_walk/AnimationPlayer") +parameters/TimeScale/scale = 1.0 +script = ExtResource("17_3hgrb") +entity = NodePath("..") + +[node name="Mover" type="Node" parent="."] +script = ExtResource("18_tffdk") +_speed = SubResource("Resource_v1iwd") +_speedControlMult = 1.94682 + +[node name="HitPlayer" type="Node" parent="."] +script = ExtResource("19_k2y7k") playlist = Array[AudioStream]([ExtResource("5_lt6ps"), ExtResource("6_kedip")]) channels = Array[String](["metal_hit", "hit"]) +metadata/_custom_type_script = "uid://c36bj8u7jghc7" -[node name="Armor" parent="." index="6"] +[node name="Armor" type="Node" parent="."] +script = ExtResource("22_aasgd") MaxHP = 550.0 -[node name="FlashController" parent="Armor" index="0"] -shaderMaterial = SubResource("ShaderMaterial_1iamf") +[node name="FlashController" type="Node" parent="Armor"] +script = ExtResource("23_rgojs") +shaderMaterial = ExtResource("24_wndvs") -[node name="FlashController" parent="." index="10"] -shaderMaterial = SubResource("ShaderMaterial_03nuu") +[node name="GroanPlayer" type="Node" parent="."] +script = ExtResource("24_3ui6x") +audioStream = ExtResource("25_ix7xe") +channel = "groan" +metadata/_custom_type_script = "uid://c36bj8u7jghc7" + +[node name="Timer" type="Timer" parent="GroanPlayer"] +wait_time = 20.0 + +[node name="StartTimer" type="Timer" parent="GroanPlayer/Timer"] +wait_time = 5.0 +one_shot = true +autostart = true + +[node name="EffectPlayer" type="Node" parent="."] +script = ExtResource("26_7018m") +effectsToMap = Array[Resource]([ExtResource("27_wd16f"), ExtResource("28_b1su1")]) +streamsToMapTo = Array[AudioStream]([ExtResource("29_si5j4"), ExtResource("30_qu32w")]) +streamSettings = Array[Object]([null, SubResource("Resource_dn8ha")]) + +[node name="DeathHandler" type="Node" parent="." node_paths=PackedStringArray("_tree", "_collider")] +script = ExtResource("32_m7hhr") +_tree = NodePath("../AnimationTree") +_collider = NodePath("../Hitbox/CollisionShape2D") + +[node name="FlashController" type="Node" parent="."] +script = ExtResource("23_rgojs") +shaderMaterial = ExtResource("34_jdtg8") + +[connection signal="HasBeenKilled" from="." to="DeathHandler" method="OnKilled"] +[connection signal="OnDamaged" from="." to="HitPlayer" method="Play"] +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle" method="FallOff"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Jaw/RemoteTransform2D" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/RightEye/RemoteTransform2D" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/LeftEye/RemoteTransform2D" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" method="FallOff"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand/Left_Hand_Remote" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/Left_Lower_Arm_Remote" method="queue_free"] +[connection signal="area_entered" from="Eatbox" to="Eatbox" method="OnAreaEntered"] +[connection signal="area_exited" from="Eatbox" to="Eatbox" method="OnAreaExited"] +[connection signal="ArmorLost" from="Armor" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Hat" method="FallOff"] +[connection signal="ArmorLost" from="Armor" to="HitPlayer" method="Next"] +[connection signal="Damaged" from="Armor" to="HitPlayer" method="Play"] +[connection signal="Damaged" from="Armor" to="Armor/FlashController" method="DamageFlash"] +[connection signal="HpChanged" from="Armor" to="." method="HPChangedMixedInvoker"] +[connection signal="timeout" from="GroanPlayer/Timer" to="GroanPlayer" method="Play"] +[connection signal="timeout" from="GroanPlayer/Timer/StartTimer" to="GroanPlayer/Timer" method="start"] diff --git a/scenes/entities/Zombies/cone_zombie.tscn b/scenes/entities/Zombies/cone_zombie.tscn index 894b678..26d0608 100644 --- a/scenes/entities/Zombies/cone_zombie.tscn +++ b/scenes/entities/Zombies/cone_zombie.tscn @@ -1,21 +1,764 @@ -[gd_scene load_steps=18 format=3 uid="uid://hhjbqkjqpt7x"] +[gd_scene load_steps=69 format=3 uid="uid://hhjbqkjqpt7x"] -[ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="1_3dq4c"] -[ext_resource type="Shader" uid="uid://btf4xhu31ln6n" path="res://assets/shaders/canvas_group_flash.gdshader" id="2_s2p07"] +[ext_resource type="Script" uid="uid://dildme6epx8l4" path="res://scripts/entities/zombies/RuntimeZombieData.cs" id="1_ffeg6"] +[ext_resource type="Material" uid="uid://jr0vpg030jqv" path="res://assets/ZombieMaterial.tres" id="2_ffeg6"] [ext_resource type="Script" uid="uid://fd4im1fmwc5n" path="res://scripts/entities/Armor.cs" id="3_5s7in"] [ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="3_b8kja"] +[ext_resource type="Texture2D" uid="uid://dacgbwohpmeed" path="res://assets/sprites/zombies/basic.png" id="3_d7bfv"] [ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/particles/FallParticle.cs" id="3_w70im"] [ext_resource type="Texture2D" uid="uid://ceqvdmude7cgg" path="res://assets/sprites/cone1.tres" id="4_qdhik"] [ext_resource type="Script" uid="uid://c3cfnrmnnuqms" path="res://addons/floatmodifiers/FloatModifiers.cs" id="4_qof5v"] +[ext_resource type="Script" uid="uid://dau0tfmlfiqmo" path="res://scripts/entities/EntityHPObserver.cs" id="5_25dv7"] [ext_resource type="Script" uid="uid://bbw848msxb4re" path="res://scripts/entities/DegradingSprite.cs" id="5_ickyd"] [ext_resource type="Texture2D" uid="uid://cl5ekw72wi75c" path="res://assets/sprites/cone2.tres" id="6_b6mal"] [ext_resource type="AudioStream" uid="uid://bmupd3v3gvsca" path="res://assets/audio/sfx/plastichit_generic.tres" id="7_0amn8"] [ext_resource type="Texture2D" uid="uid://cnn81r1y0xwod" path="res://assets/sprites/cone3.tres" id="7_011r0"] [ext_resource type="AudioStream" uid="uid://w0qfwds4o3ti" path="res://assets/audio/sfx/hit_generic.tres" id="7_67t4t"] +[ext_resource type="Texture2D" uid="uid://dri70dxyks7xh" path="res://assets/sprites/zombies/hobo.png" id="11_a7ae5"] +[ext_resource type="AnimationLibrary" uid="uid://ceb3khu7rwgy8" path="res://assets/animations/zombies/basic.res" id="12_1gn3d"] [ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="13_7fceb"] +[ext_resource type="Script" uid="uid://dw7v3s4kbu7ma" path="res://scripts/entities/AnimationStatistics.cs" id="13_xh0ny"] +[ext_resource type="Script" uid="uid://dqyony6jxt2p0" path="res://scripts/entities/zombies/EatBox.cs" id="14_kx47n"] +[ext_resource type="AnimationNodeStateMachine" uid="uid://dj0blope85bg7" path="res://assets/animations/zombies/basic_zombie_tree.tres" id="16_q51xn"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="17_tttgn"] +[ext_resource type="Script" uid="uid://7hdj2k14lfe4" path="res://scripts/entities/zombies/ZombieMover.cs" id="18_1pso5"] +[ext_resource type="Script" uid="uid://cnn0ymuhypdff" path="res://scripts/audio/ChannelPlaylist.cs" id="19_n3dlr"] +[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="24_v3jd8"] +[ext_resource type="AudioStream" uid="uid://bg76miyscfvhu" path="res://assets/audio/sfx/groan.tres" id="25_6yd48"] +[ext_resource type="Script" uid="uid://b8r6fxsfjdo3a" path="res://scripts/audio/EffectBasedPlayer.cs" id="26_myimu"] +[ext_resource type="Resource" uid="uid://dsg1vjx76ifgu" path="res://assets/effects/GarlicEffect.tres" id="27_dxxec"] +[ext_resource type="Resource" uid="uid://7uj0oe656jfx" path="res://assets/effects/SnowSlow.tres" id="28_wg63k"] +[ext_resource type="AudioStream" uid="uid://dt13iugnnx4op" path="res://assets/audio/sfx/yuck_generic.tres" id="29_fah3r"] +[ext_resource type="AudioStream" uid="uid://bjotp63arocci" path="res://assets/audio/sfx/frozen.mp3" id="30_p00wq"] +[ext_resource type="Script" uid="uid://c1x4n4nqyq72f" path="res://scripts/audio/ChannelSettings.cs" id="31_uyysk"] +[ext_resource type="Script" uid="uid://dk32ln8c2574d" path="res://scripts/entities/zombies/ZombieKillHandler.cs" id="32_1sywa"] + +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_wn68q"] +tip_nodepath = NodePath("Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 17 +joint_data/0/bone2d_node = NodePath("Butt/Body/LeftUpperArm/LeftLowerArm") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = true +joint_data/0/constraint_angle_min = 0.0 +joint_data/0/constraint_angle_max = 90.0 +joint_data/0/constraint_angle_invert = false +joint_data/0/constraint_in_localspace = true +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 16 +joint_data/1/bone2d_node = NodePath("Butt/Body/LeftUpperArm") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = false +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false + +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_x5uj2"] +tip_nodepath = NodePath("Butt/Body/RightUpperArm/RightLowerArm/RightHand") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 8 +joint_data/0/bone2d_node = NodePath("Butt/Body/RightUpperArm") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = false +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 9 +joint_data/1/bone2d_node = NodePath("Butt/Body/RightUpperArm/RightLowerArm") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = true +joint_data/1/constraint_angle_min = 0.0 +joint_data/1/constraint_angle_max = 90.0 +joint_data/1/constraint_angle_invert = false +joint_data/1/constraint_in_localspace = true +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false + +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_vcc72"] +tip_nodepath = NodePath("Butt/RightUpperLeg/RightLowerLeg/RightFoot") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 1 +joint_data/0/bone2d_node = NodePath("Butt/RightUpperLeg") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = true +joint_data/0/constraint_angle_min = -90.0 +joint_data/0/constraint_angle_max = 90.0 +joint_data/0/constraint_angle_invert = true +joint_data/0/constraint_in_localspace = true +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 2 +joint_data/1/bone2d_node = NodePath("Butt/RightUpperLeg/RightLowerLeg") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = true +joint_data/1/constraint_angle_min = 0.0 +joint_data/1/constraint_angle_max = 160.0 +joint_data/1/constraint_angle_invert = false +joint_data/1/constraint_in_localspace = true +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false + +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_kto0i"] +tip_nodepath = NodePath("Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 4 +joint_data/0/bone2d_node = NodePath("Butt/LeftUpperLeg") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = true +joint_data/0/constraint_angle_min = -90.0 +joint_data/0/constraint_angle_max = 90.0 +joint_data/0/constraint_angle_invert = true +joint_data/0/constraint_in_localspace = true +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 5 +joint_data/1/bone2d_node = NodePath("Butt/LeftUpperLeg/LeftLowerLeg") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = true +joint_data/1/constraint_angle_min = -90.0 +joint_data/1/constraint_angle_max = 0.0 +joint_data/1/constraint_angle_invert = true +joint_data/1/constraint_in_localspace = true +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false + +[sub_resource type="SkeletonModificationStack2D" id="SkeletonModificationStack2D_wn68q"] +modification_count = 4 +modifications/0 = SubResource("SkeletonModification2DCCDIK_wn68q") +modifications/1 = SubResource("SkeletonModification2DCCDIK_x5uj2") +modifications/2 = SubResource("SkeletonModification2DCCDIK_vcc72") +modifications/3 = SubResource("SkeletonModification2DCCDIK_kto0i") + +[sub_resource type="AtlasTexture" id="AtlasTexture_jvn5w"] +atlas = ExtResource("3_d7bfv") +region = Rect2(15, 30, 20, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vmdbp"] +atlas = ExtResource("3_d7bfv") +region = Rect2(64, 44, 10, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x1oyw"] +atlas = ExtResource("3_d7bfv") +region = Rect2(93, 50, 17, 9) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vjx3c"] +atlas = ExtResource("3_d7bfv") +region = Rect2(79, 44, 10, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_f31xd"] +atlas = ExtResource("3_d7bfv") +region = Rect2(47, 33, 8, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_od8jf"] +atlas = ExtResource("3_d7bfv") +region = Rect2(59, 33, 7, 10) + +[sub_resource type="AtlasTexture" id="AtlasTexture_p4711"] +atlas = ExtResource("3_d7bfv") +region = Rect2(71, 30, 19, 13) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1bk2b"] +atlas = ExtResource("3_d7bfv") +region = Rect2(12, 43, 6, 18) + +[sub_resource type="AtlasTexture" id="AtlasTexture_y06yv"] +atlas = ExtResource("3_d7bfv") +region = Rect2(36, 50, 9, 11) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lu8go"] +atlas = ExtResource("3_d7bfv") +region = Rect2(22, 45, 8, 15) + +[sub_resource type="AtlasTexture" id="AtlasTexture_cdq7v"] +atlas = ExtResource("3_d7bfv") +region = Rect2(93, 8, 29, 39) + +[sub_resource type="AtlasTexture" id="AtlasTexture_e7wc3"] +atlas = ExtResource("3_d7bfv") +region = Rect2(72, 2, 13, 26) + +[sub_resource type="AtlasTexture" id="AtlasTexture_wn68q"] +atlas = ExtResource("3_d7bfv") +region = Rect2(36, 0, 32, 29) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vcc72"] +atlas = ExtResource("3_d7bfv") +region = Rect2(93, 3, 2, 3) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kto0i"] +atlas = ExtResource("3_d7bfv") +region = Rect2(105, 2, 3, 4) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x5uj2"] +atlas = ExtResource("3_d7bfv") +region = Rect2(15, 17, 17, 6) + +[sub_resource type="CircleShape2D" id="CircleShape2D_dn8ha"] [sub_resource type="CircleShape2D" id="CircleShape2D_67t4t"] +[sub_resource type="AtlasTexture" id="AtlasTexture_djocr"] +atlas = ExtResource("3_d7bfv") +region = Rect2(2, 7, 6, 19) + +[sub_resource type="AtlasTexture" id="AtlasTexture_auqeq"] +atlas = ExtResource("3_d7bfv") +region = Rect2(0, 32, 9, 15) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vlvtp"] +atlas = ExtResource("11_a7ae5") +region = Rect2(55, 0, 9, 10) + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ccrjo"] +radius = 3.00026 +height = 16.007 + +[sub_resource type="Animation" id="Animation_vn3j1"] +resource_name = "RESET" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-2, 14)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm:rotation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand:position") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, 13)] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand:rotation") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("Zombie/Butt/Body/LeftUpperArm:position") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, -20)] +} +tracks/5/type = "value" +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/path = NodePath("Zombie/Butt/Body/LeftUpperArm:rotation") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/6/type = "value" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("Zombie/Butt/Body/Head/LeftEye:position") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-4, -9)] +} +tracks/7/type = "value" +tracks/7/imported = false +tracks/7/enabled = true +tracks/7/path = NodePath("Zombie/Butt/Body/Head/LeftEye:rotation") +tracks/7/interp = 1 +tracks/7/loop_wrap = true +tracks/7/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/8/type = "value" +tracks/8/imported = false +tracks/8/enabled = true +tracks/8/path = NodePath("Zombie/Butt/Body/Head/RightEye:position") +tracks/8/interp = 1 +tracks/8/loop_wrap = true +tracks/8/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-16, -8)] +} +tracks/9/type = "value" +tracks/9/imported = false +tracks/9/enabled = true +tracks/9/path = NodePath("Zombie/Butt/Body/Head/RightEye:rotation") +tracks/9/interp = 1 +tracks/9/loop_wrap = true +tracks/9/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/10/type = "value" +tracks/10/imported = false +tracks/10/enabled = true +tracks/10/path = NodePath("Zombie/Butt/Body/Head/Jaw:position") +tracks/10/interp = 1 +tracks/10/loop_wrap = true +tracks/10/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-3, 3)] +} +tracks/11/type = "value" +tracks/11/imported = false +tracks/11/enabled = true +tracks/11/path = NodePath("Zombie/Butt/Body/Head/Jaw:rotation") +tracks/11/interp = 1 +tracks/11/loop_wrap = true +tracks/11/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/12/type = "value" +tracks/12/imported = false +tracks/12/enabled = true +tracks/12/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand:position") +tracks/12/interp = 1 +tracks/12/loop_wrap = true +tracks/12/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, 13)] +} +tracks/13/type = "value" +tracks/13/imported = false +tracks/13/enabled = true +tracks/13/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand:rotation") +tracks/13/interp = 1 +tracks/13/loop_wrap = true +tracks/13/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/14/type = "value" +tracks/14/imported = false +tracks/14/enabled = true +tracks/14/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm:position") +tracks/14/interp = 1 +tracks/14/loop_wrap = true +tracks/14/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-2, 15)] +} +tracks/15/type = "value" +tracks/15/imported = false +tracks/15/enabled = true +tracks/15/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm:rotation") +tracks/15/interp = 1 +tracks/15/loop_wrap = true +tracks/15/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/16/type = "value" +tracks/16/imported = false +tracks/16/enabled = true +tracks/16/path = NodePath("Zombie/Butt/Body/RightUpperArm:position") +tracks/16/interp = 1 +tracks/16/loop_wrap = true +tracks/16/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-14, -23)] +} +tracks/17/type = "value" +tracks/17/imported = false +tracks/17/enabled = true +tracks/17/path = NodePath("Zombie/Butt/Body/RightUpperArm:rotation") +tracks/17/interp = 1 +tracks/17/loop_wrap = true +tracks/17/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/18/type = "value" +tracks/18/imported = false +tracks/18/enabled = true +tracks/18/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot:position") +tracks/18/interp = 1 +tracks/18/loop_wrap = true +tracks/18/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(6, 10)] +} +tracks/19/type = "value" +tracks/19/imported = false +tracks/19/enabled = true +tracks/19/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot:rotation") +tracks/19/interp = 1 +tracks/19/loop_wrap = true +tracks/19/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/20/type = "value" +tracks/20/imported = false +tracks/20/enabled = true +tracks/20/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg:position") +tracks/20/interp = 1 +tracks/20/loop_wrap = true +tracks/20/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, 13)] +} +tracks/21/type = "value" +tracks/21/imported = false +tracks/21/enabled = true +tracks/21/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg:rotation") +tracks/21/interp = 1 +tracks/21/loop_wrap = true +tracks/21/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/22/type = "value" +tracks/22/imported = false +tracks/22/enabled = true +tracks/22/path = NodePath("Zombie/Butt/LeftUpperLeg:position") +tracks/22/interp = 1 +tracks/22/loop_wrap = true +tracks/22/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(6, 4)] +} +tracks/23/type = "value" +tracks/23/imported = false +tracks/23/enabled = true +tracks/23/path = NodePath("Zombie/Butt/LeftUpperLeg:rotation") +tracks/23/interp = 1 +tracks/23/loop_wrap = true +tracks/23/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/24/type = "value" +tracks/24/imported = false +tracks/24/enabled = true +tracks/24/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot:position") +tracks/24/interp = 1 +tracks/24/loop_wrap = true +tracks/24/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-2, 14)] +} +tracks/25/type = "value" +tracks/25/imported = false +tracks/25/enabled = true +tracks/25/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot:rotation") +tracks/25/interp = 1 +tracks/25/loop_wrap = true +tracks/25/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/26/type = "value" +tracks/26/imported = false +tracks/26/enabled = true +tracks/26/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg:position") +tracks/26/interp = 1 +tracks/26/loop_wrap = true +tracks/26/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-2, 12)] +} +tracks/27/type = "value" +tracks/27/imported = false +tracks/27/enabled = true +tracks/27/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg:rotation") +tracks/27/interp = 1 +tracks/27/loop_wrap = true +tracks/27/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/28/type = "value" +tracks/28/imported = false +tracks/28/enabled = true +tracks/28/path = NodePath("Zombie/Butt/RightUpperLeg:position") +tracks/28/interp = 1 +tracks/28/loop_wrap = true +tracks/28/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-6, 3)] +} +tracks/29/type = "value" +tracks/29/imported = false +tracks/29/enabled = true +tracks/29/path = NodePath("Zombie/Butt/RightUpperLeg:rotation") +tracks/29/interp = 1 +tracks/29/loop_wrap = true +tracks/29/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/30/type = "value" +tracks/30/imported = false +tracks/30/enabled = true +tracks/30/path = NodePath("Zombie/Butt:position") +tracks/30/interp = 1 +tracks/30/loop_wrap = true +tracks/30/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(5, -35)] +} +tracks/31/type = "value" +tracks/31/imported = false +tracks/31/enabled = true +tracks/31/path = NodePath("Zombie/Butt:rotation") +tracks/31/interp = 1 +tracks/31/loop_wrap = true +tracks/31/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/32/type = "value" +tracks/32/imported = false +tracks/32/enabled = true +tracks/32/path = NodePath("Zombie/Butt/Body:position") +tracks/32/interp = 1 +tracks/32/loop_wrap = true +tracks/32/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(1, -2)] +} +tracks/33/type = "value" +tracks/33/imported = false +tracks/33/enabled = true +tracks/33/path = NodePath("Zombie/Butt/Body:rotation") +tracks/33/interp = 1 +tracks/33/loop_wrap = true +tracks/33/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/34/type = "value" +tracks/34/imported = false +tracks/34/enabled = true +tracks/34/path = NodePath("Zombie:position") +tracks/34/interp = 1 +tracks/34/loop_wrap = true +tracks/34/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(0, 0)] +} +tracks/35/type = "value" +tracks/35/imported = false +tracks/35/enabled = true +tracks/35/path = NodePath("Zombie:rotation") +tracks/35/interp = 1 +tracks/35/loop_wrap = true +tracks/35/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/36/type = "value" +tracks/36/imported = false +tracks/36/enabled = true +tracks/36/path = NodePath("Zombie/Butt/Body/Head:position") +tracks/36/interp = 1 +tracks/36/loop_wrap = true +tracks/36/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-10, -25)] +} +tracks/37/type = "value" +tracks/37/imported = false +tracks/37/enabled = true +tracks/37/path = NodePath("Zombie/Butt/Body/Head:rotation") +tracks/37/interp = 1 +tracks/37/loop_wrap = true +tracks/37/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/38/type = "value" +tracks/38/imported = false +tracks/38/enabled = true +tracks/38/path = NodePath("Zombie/Butt/Body/Head:visible") +tracks/38/interp = 1 +tracks/38/loop_wrap = true +tracks/38/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/39/type = "value" +tracks/39/imported = false +tracks/39/enabled = true +tracks/39/path = NodePath("Zombie/Butt/Body/Head/TrashcanLid:position") +tracks/39/interp = 1 +tracks/39/loop_wrap = true +tracks/39/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-0.0022974, -17.0131)] +} +tracks/40/type = "value" +tracks/40/imported = false +tracks/40/enabled = true +tracks/40/path = NodePath("Zombie/Butt/Body/Head/TrashcanLid:rotation") +tracks/40/interp = 1 +tracks/40/loop_wrap = true +tracks/40/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/41/type = "value" +tracks/41/imported = false +tracks/41/enabled = true +tracks/41/path = NodePath("Zombie/Butt/Body/Head/TrashcanLid:visible") +tracks/41/interp = 1 +tracks/41/loop_wrap = true +tracks/41/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} +tracks/42/type = "value" +tracks/42/imported = false +tracks/42/enabled = true +tracks/42/path = NodePath("Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm/Left_Hand:texture") +tracks/42/interp = 1 +tracks/42/loop_wrap = true +tracks/42/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [SubResource("AtlasTexture_vlvtp")] +} +tracks/43/type = "value" +tracks/43/imported = false +tracks/43/enabled = true +tracks/43/path = NodePath("Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm/Left_Hand:offset") +tracks/43/interp = 1 +tracks/43/loop_wrap = true +tracks/43/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-4, -1)] +} +tracks/44/type = "value" +tracks/44/imported = false +tracks/44/enabled = true +tracks/44/path = NodePath("Zombie/Butt/Body/Tie:scale") +tracks/44/interp = 1 +tracks/44/loop_wrap = true +tracks/44/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(1, 1)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_x5uj2"] +_data = { +&"RESET": SubResource("Animation_vn3j1") +} + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_hxyad"] +size = Vector2(26, 48) + [sub_resource type="Resource" id="Resource_011r0"] resource_local_to_scene = true script = ExtResource("4_qof5v") @@ -23,6 +766,18 @@ flat_value = 5.0 percentage_value = 0.0 mult_value = 1.0 +[sub_resource type="RectangleShape2D" id="RectangleShape2D_r4ug6"] +size = Vector2(16, 48) + +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_2q05d"] + +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_ccrjo"] +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_2q05d") +nodes/TimeScale/position = Vector2(60, 120) +nodes/Tree/node = ExtResource("16_q51xn") +nodes/Tree/position = Vector2(-240, 120) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + [sub_resource type="Resource" id="Resource_b6mal"] resource_local_to_scene = true script = ExtResource("4_qof5v") @@ -30,69 +785,284 @@ flat_value = 0.2 percentage_value = 0.0 mult_value = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_b8kja"] -resource_local_to_scene = true -shader = ExtResource("2_s2p07") -shader_parameter/FLASH_COLOR = Color(1, 0.709804, 0.439216, 0.5) -shader_parameter/HIGHLIGHT_COLOR = Color(1, 0.709804, 0.439216, 0.5) -shader_parameter/blend = 0.0 -shader_parameter/selected = false +[sub_resource type="Resource" id="Resource_dn8ha"] +script = ExtResource("31_uyysk") +restartTreshold = -1.0 +metadata/_custom_type_script = "uid://c1x4n4nqyq72f" -[node name="ConeZombie" node_paths=PackedStringArray("_armor") instance=ExtResource("1_3dq4c")] +[node name="ConeZombie" type="Node2D" node_paths=PackedStringArray("_armor", "_player", "_tree")] +y_sort_enabled = true +script = ExtResource("1_ffeg6") _armor = NodePath("Armor") +MaxHP = 100.0 +_player = NodePath("CanvasGroup/basic_zombie_walk/AnimationPlayer") +_tree = NodePath("AnimationTree") +metadata/_edit_vertical_guides_ = [-159.0] -[node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"] -scale = Vector2(0.999835, 0.999835) +[node name="CanvasGroup" type="CanvasGroup" parent="."] +material = ExtResource("2_ffeg6") -[node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"] -scale = Vector2(0.999837, 0.999837) +[node name="basic_zombie_walk" type="Node2D" parent="CanvasGroup"] -[node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] -scale = Vector2(0.999835, 0.999835) +[node name="Zombie" type="Skeleton2D" parent="CanvasGroup/basic_zombie_walk"] +use_parent_material = true +modification_stack = SubResource("SkeletonModificationStack2D_wn68q") -[node name="LeftUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="2"] +[node name="Butt" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie"] +use_parent_material = true +position = Vector2(5, -35) +scale = Vector2(0.999903, 0.999903) +rest = Transform2D(1, 0, 0, 1, 5, -35) +editor_settings/show_bone_gizmo = false + +[node name="Butt" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] +use_parent_material = true +texture = SubResource("AtlasTexture_jvn5w") +centered = false +offset = Vector2(-10, -3) +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.999834, 0.999834) +rest = Transform2D(1, 0, 0, 1, -6, 3) +editor_settings/show_bone_gizmo = false + +[node name="Right_Upper_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg"] +texture = SubResource("AtlasTexture_vmdbp") +centered = false +offset = Vector2(-6, -2) +metadata/_edit_lock_ = true + +[node name="RightLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg"] +position = Vector2(-2, 12) +scale = Vector2(0.999834, 0.999834) +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.999833, 0.999833) +rest = Transform2D(1, 0, 0, 1, -2, 14) +auto_calculate_length_and_angle = false +length = 12.0 +bone_angle = 0.0 +editor_settings/show_bone_gizmo = false -[node name="LeftLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="1"] -scale = Vector2(0.999833, 0.999833) +[node name="Right_Foot" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot"] +texture = SubResource("AtlasTexture_x1oyw") +centered = false +offset = Vector2(-4, -3) +metadata/_edit_lock_ = true -[node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] +[node name="Right_Lower_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg"] +position = Vector2(-18, -2) +texture = SubResource("AtlasTexture_vjx3c") +centered = false +offset = Vector2(12, 1) +metadata/_edit_lock_ = true + +[node name="LeftUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] +use_parent_material = true +position = Vector2(6, 4) +scale = Vector2(0.999835, 0.999835) +rest = Transform2D(1, 0, 0, 1, 6, 4) +editor_settings/show_bone_gizmo = false + +[node name="Left_Upper_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg"] +texture = SubResource("AtlasTexture_f31xd") +centered = false +offset = Vector2(-4, -2) +metadata/_edit_lock_ = true + +[node name="LeftLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg"] +position = Vector2(-1, 13) +scale = Vector2(0.999831, 0.999831) +rest = Transform2D(1, 0, 0, 1, -1, 13) +editor_settings/show_bone_gizmo = false + +[node name="Left_Lower_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg"] +texture = SubResource("AtlasTexture_od8jf") +centered = false +offset = Vector2(-1, 0) +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.999829, 0.999829) +rest = Transform2D(1, 0, 0, 1, 6, 10) +auto_calculate_length_and_angle = false +length = 12.0 +bone_angle = 160.0 +editor_settings/show_bone_gizmo = false -[node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"] +[node name="Left_Foot" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot"] +texture = SubResource("AtlasTexture_p4711") +centered = false +offset = Vector2(-14, -3) +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.99983, 0.99983) +rest = Transform2D(1, 0, 0, 1, 1, -2) +editor_settings/show_bone_gizmo = false -[node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"] -scale = Vector2(0.999829, 0.999829) - -[node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] -scale = Vector2(0.999826, 0.999826) - -[node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"] +[node name="RightUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +use_parent_material = true +position = Vector2(-14, -23) scale = Vector2(0.999828, 0.999828) +rest = Transform2D(1, 0, 0, 1, -14, -23) +editor_settings/show_bone_gizmo = false -[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] -rotation = 0.0945796 -skew = -0.000153542 +[node name="Right_Upper_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"] +texture = SubResource("AtlasTexture_1bk2b") +centered = false +offset = Vector2(-4, -2) +metadata/_edit_lock_ = true -[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3"] -scale = Vector2(0.999829, 0.999829) +[node name="RightLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"] +position = Vector2(-2, 15) +scale = Vector2(0.999828, 0.999828) +rest = Transform2D(1, 0, 0, 1, -2, 15) +editor_settings/show_bone_gizmo = false -[node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"] +[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) +rest = Transform2D(1, 0, 0, 1, -1, 13) +auto_calculate_length_and_angle = false +length = 8.0 +bone_angle = 90.0 +editor_settings/show_bone_gizmo = false + +[node name="Right_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand"] +texture = SubResource("AtlasTexture_y06yv") +centered = false +offset = Vector2(-4, -2) +metadata/_edit_lock_ = true + +[node name="Right_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm"] +texture = SubResource("AtlasTexture_lu8go") +centered = false +offset = Vector2(-5, -1) +metadata/_edit_lock_ = true + +[node name="Body" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +rotation = 0.00163735 +texture = SubResource("AtlasTexture_cdq7v") +centered = false +offset = Vector2(-15, -27) +metadata/_edit_lock_ = true + +[node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +position = Vector2(-9, -21) +rotation = -0.128654 +skew = -0.000155091 +rest = Transform2D(1, 0, 0, 1, -9, -21) +auto_calculate_length_and_angle = false +length = 24.0 +bone_angle = 100.0 +editor_settings/show_bone_gizmo = false + +[node name="Tie" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Tie"] +texture = SubResource("AtlasTexture_e7wc3") +centered = false +offset = Vector2(-10, -1) +metadata/_edit_lock_ = true + +[node name="Head" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +position = Vector2(-10, -25) +scale = Vector2(0.999827, 0.999827) +rest = Transform2D(1, 0, 0, 1, -10, -25) +editor_settings/show_bone_gizmo = false + +[node name="HeadParticle" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" node_paths=PackedStringArray("data")] +collision_layer = 128 +collision_mask = 64 +freeze = true +script = ExtResource("3_w70im") +data = NodePath("../../../../../../..") +maxAngle = 45.0 +minTorque = -45.0 +maxTorque = 45.0 +Impulse = 100.0 + +[node name="Head" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle"] +texture = SubResource("AtlasTexture_wn68q") +centered = false +offset = Vector2(-20, -24) +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) +texture = SubResource("AtlasTexture_vcc72") +centered = false +offset = Vector2(-2, -2) +metadata/_edit_lock_ = true -[node name="Left_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="1"] +[node name="Left_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"] +position = Vector2(-4, -9.00001) +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(-2.84023, 2.61439) +rotation = -0.0898652 +scale = Vector2(0.999827, 0.999827) +texture = SubResource("AtlasTexture_x5uj2") +centered = false +offset = Vector2(-12, -2) +metadata/_edit_lock_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle"] +position = Vector2(-4.58496, -8.21035) +shape = SubResource("CircleShape2D_dn8ha") + +[node name="Observer" type="Node" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle" node_paths=PackedStringArray("_observedEntity")] +script = ExtResource("5_25dv7") +_threshold = 0.0 +_observedEntity = NodePath("../../../../../../../..") + +[node name="Jaw" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] +position = Vector2(-3, 3) +scale = Vector2(0.999827, 0.999827) +rest = Transform2D(1, 0, 0, 1, -3, 3) +auto_calculate_length_and_angle = false +length = 11.0 +bone_angle = 180.0 +editor_settings/show_bone_gizmo = false + +[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Jaw"] +remote_path = NodePath("../../HeadParticle/Head/Jaw") + +[node name="RightEye" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] +position = Vector2(-16, -8) +rest = Transform2D(1, 0, 0, 1, -16, -8) +auto_calculate_length_and_angle = false +length = 2.0 +bone_angle = 180.0 +editor_settings/show_bone_gizmo = false + +[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/RightEye"] +remote_path = NodePath("../../HeadParticle/Head/Right_Eye") + +[node name="LeftEye" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] position = Vector2(-4, -9) +rest = Transform2D(1, 0, 0, 1, -4, -9) +auto_calculate_length_and_angle = false +length = 2.0 +bone_angle = 180.0 +editor_settings/show_bone_gizmo = false -[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"] -position = Vector2(-3.00116, 2.99804) -rotation = 0.00917867 -scale = Vector2(0.999829, 0.999829) +[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/LeftEye"] +remote_path = NodePath("../../HeadParticle/Head/Left_Eye") -[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] -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")] +[node name="Hat" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" node_paths=PackedStringArray("data")] position = Vector2(-2.5, -13.5) collision_layer = 128 collision_mask = 64 @@ -106,7 +1076,7 @@ minTorque = -45.0 maxTorque = 45.0 Impulse = 100.0 -[node name="Sprite" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Hat" index="0" node_paths=PackedStringArray("armor")] +[node name="Sprite" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Hat" node_paths=PackedStringArray("armor")] material = ExtResource("3_b8kja") position = Vector2(-1, -12) texture = ExtResource("4_qdhik") @@ -115,52 +1085,183 @@ armor = NodePath("../../../../../../../../Armor") degradationStages = Array[Texture]([ExtResource("4_qdhik"), ExtResource("6_b6mal"), ExtResource("7_011r0")]) thresholdPercentage = Array[float]([1.0, 0.667, 0.333]) -[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Hat" index="1"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Hat"] position = Vector2(1, -6) shape = SubResource("CircleShape2D_67t4t") -[node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="4"] -scale = Vector2(0.999833, 0.999833) - -[node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"] -rotation = 0.0889256 -scale = Vector2(0.999999, 0.999999) - -[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 = -0.0392463 -scale = Vector2(0.999658, 0.999658) - -[node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"] +[node name="LeftUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +position = Vector2(-1, -20) scale = Vector2(0.999829, 0.999829) +rest = Transform2D(1, 0, 0, 1, -1, -20) +editor_settings/show_bone_gizmo = false -[node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"] +[node name="Left_Upper_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm"] +position = Vector2(-37, 10) +texture = SubResource("AtlasTexture_djocr") +centered = false +offset = Vector2(33, -12) +metadata/_edit_lock_ = true + +[node name="HandProjectile" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" node_paths=PackedStringArray("data")] +position = Vector2(-2, 14) +collision_layer = 128 +collision_mask = 64 +freeze = true +script = ExtResource("3_w70im") +data = NodePath("../../../../../../..") +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.136361 +scale = Vector2(0.999995, 0.999995) +texture = SubResource("AtlasTexture_auqeq") +centered = false +offset = Vector2(-5, 0) +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.112403 +scale = Vector2(0.999658, 0.999658) +texture = SubResource("AtlasTexture_vlvtp") +centered = false +offset = Vector2(-4, -1) +metadata/_edit_lock_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"] +position = Vector2(-0.00104554, 13.0063) +shape = SubResource("CapsuleShape2D_ccrjo") + +[node name="Observer" type="Node" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" node_paths=PackedStringArray("_observedEntity")] +script = ExtResource("5_25dv7") +_observedEntity = NodePath("../../../../../../../..") + +[node name="LeftLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm"] +position = Vector2(-2, 14) +scale = Vector2(0.999825, 0.999825) +rest = Transform2D(1, 0, 0, 1, -2, 14) +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.999828, 0.999828) +rest = Transform2D(1, 0, 0, 1, -1, 13) +auto_calculate_length_and_angle = false +length = 6.0 +bone_angle = 90.0 +editor_settings/show_bone_gizmo = false -[node name="Eatbox" parent="." index="2"] +[node name="Left_Hand_Remote" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand"] +remote_path = NodePath("../../../HandProjectile/Left_Lower_Arm/Left_Hand") + +[node name="Left_Lower_Arm_Remote" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm"] +scale = Vector2(1.00017, 1.00017) +remote_path = NodePath("../../HandProjectile/Left_Lower_Arm") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="CanvasGroup/basic_zombie_walk"] +libraries = { +&"": SubResource("AnimationLibrary_x5uj2"), +&"basic": ExtResource("12_1gn3d") +} + +[node name="EatingStatistics" type="Node" parent="CanvasGroup/basic_zombie_walk/AnimationPlayer"] +script = ExtResource("13_xh0ny") +animationName = "basic/eating" +trackToFind = "../../Eatbox" + +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 8 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] +position = Vector2(4, -24) +shape = SubResource("RectangleShape2D_hxyad") + +[node name="Eatbox" type="Area2D" parent="."] +collision_layer = 0 +collision_mask = 2 +script = ExtResource("14_kx47n") _damage = SubResource("Resource_011r0") -[node name="Mover" parent="." index="4"] -_speed = SubResource("Resource_b6mal") -_speedControlMult = 0.371759 +[node name="CollisionShape2D" type="CollisionShape2D" parent="Eatbox"] +position = Vector2(-10, -24) +shape = SubResource("RectangleShape2D_r4ug6") -[node name="HitPlayer" parent="." index="5"] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] +root_node = NodePath("../CanvasGroup/basic_zombie_walk") +tree_root = SubResource("AnimationNodeBlendTree_ccrjo") +advance_expression_base_node = NodePath("../Eatbox") +anim_player = NodePath("../CanvasGroup/basic_zombie_walk/AnimationPlayer") +parameters/TimeScale/scale = 1.0 +script = ExtResource("17_tttgn") +entity = NodePath("..") + +[node name="Mover" type="Node" parent="."] +script = ExtResource("18_1pso5") +_speed = SubResource("Resource_b6mal") +_speedControlMult = 0.706804 + +[node name="HitPlayer" type="Node" parent="."] +script = ExtResource("19_n3dlr") playlist = Array[AudioStream]([ExtResource("7_0amn8"), ExtResource("7_67t4t")]) channels = Array[String](["plastic_hit", "hit"]) +metadata/_custom_type_script = "uid://c36bj8u7jghc7" -[node name="Armor" type="Node" parent="." index="6"] +[node name="Armor" type="Node" parent="."] script = ExtResource("3_5s7in") MaxHP = 195.0 -[node name="FlashController" type="Node" parent="Armor" index="0"] +[node name="FlashController" type="Node" parent="Armor"] script = ExtResource("13_7fceb") shaderMaterial = ExtResource("3_b8kja") -[node name="FlashController" parent="." index="10"] -shaderMaterial = SubResource("ShaderMaterial_b8kja") +[node name="GroanPlayer" type="Node" parent="."] +script = ExtResource("24_v3jd8") +audioStream = ExtResource("25_6yd48") +channel = "groan" +metadata/_custom_type_script = "uid://c36bj8u7jghc7" -[connection signal="ArmorLost" from="Armor" to="HitPlayer" method="Next"] +[node name="Timer" type="Timer" parent="GroanPlayer"] +wait_time = 20.0 + +[node name="StartTimer" type="Timer" parent="GroanPlayer/Timer"] +wait_time = 5.0 +one_shot = true +autostart = true + +[node name="EffectPlayer" type="Node" parent="."] +script = ExtResource("26_myimu") +effectsToMap = Array[Resource]([ExtResource("27_dxxec"), ExtResource("28_wg63k")]) +streamsToMapTo = Array[AudioStream]([ExtResource("29_fah3r"), ExtResource("30_p00wq")]) +streamSettings = Array[Object]([null, SubResource("Resource_dn8ha")]) + +[node name="DeathHandler" type="Node" parent="." node_paths=PackedStringArray("_tree", "_collider")] +script = ExtResource("32_1sywa") +_tree = NodePath("../AnimationTree") +_collider = NodePath("../Hitbox/CollisionShape2D") + +[node name="FlashController" type="Node" parent="."] +script = ExtResource("13_7fceb") +shaderMaterial = ExtResource("2_ffeg6") + +[connection signal="HasBeenKilled" from="." to="DeathHandler" method="OnKilled"] +[connection signal="OnDamaged" from="." to="HitPlayer" method="Play"] +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle" method="FallOff"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Jaw/RemoteTransform2D" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/RightEye/RemoteTransform2D" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/LeftEye/RemoteTransform2D" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" method="FallOff"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand/Left_Hand_Remote" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/Left_Lower_Arm_Remote" method="queue_free"] +[connection signal="area_entered" from="Eatbox" to="Eatbox" method="OnAreaEntered"] +[connection signal="area_exited" from="Eatbox" to="Eatbox" method="OnAreaExited"] [connection signal="ArmorLost" from="Armor" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Hat" method="FallOff"] +[connection signal="ArmorLost" from="Armor" to="HitPlayer" method="Next"] [connection signal="Damaged" from="Armor" to="HitPlayer" method="Play"] [connection signal="Damaged" from="Armor" to="Armor/FlashController" method="DamageFlash"] [connection signal="HpChanged" from="Armor" to="." method="HPChangedMixedInvoker"] +[connection signal="timeout" from="GroanPlayer/Timer" to="GroanPlayer" method="Play"] +[connection signal="timeout" from="GroanPlayer/Timer/StartTimer" to="GroanPlayer/Timer" method="start"] diff --git a/scenes/entities/Zombies/door_zombie.tscn b/scenes/entities/Zombies/door_zombie.tscn deleted file mode 100644 index ace74c3..0000000 --- a/scenes/entities/Zombies/door_zombie.tscn +++ /dev/null @@ -1,186 +0,0 @@ -[gd_scene load_steps=19 format=3 uid="uid://p5jhgg2r7e07"] - -[ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="1_k7yv2"] -[ext_resource type="Shader" uid="uid://d0eo5uuj222c4" path="res://assets/shaders/CG_color_blender.gdshader" id="2_g7fge"] -[ext_resource type="Script" uid="uid://dildme6epx8l4" path="res://scripts/entities/zombies/RuntimeZombieData.cs" id="2_uhol2"] -[ext_resource type="Script" uid="uid://c3cfnrmnnuqms" path="res://addons/floatmodifiers/FloatModifiers.cs" id="3_uvlkc"] -[ext_resource type="Texture2D" uid="uid://b18blso5pbc6a" path="res://assets/sprites/zombies/armor.png" id="4_ed67f"] -[ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/particles/FallParticle.cs" id="4_woxi6"] -[ext_resource type="Script" uid="uid://fd4im1fmwc5n" path="res://scripts/entities/Armor.cs" id="5_ed67f"] -[ext_resource type="Script" uid="uid://bbw848msxb4re" path="res://scripts/entities/DegradingSprite.cs" id="6_woxi6"] -[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="7_tj3uj"] -[ext_resource type="Script" uid="uid://d3l8e8ko5r5i3" path="res://scripts/entities/ArmorHPObserver.cs" id="7_uhol2"] -[ext_resource type="AudioStream" uid="uid://bu1egfsyplpx4" path="res://assets/audio/sfx/metalhit_generic.tres" id="8_uhol2"] - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_ed67f"] -size = Vector2(20, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_woxi6"] -atlas = ExtResource("4_ed67f") -region = Rect2(0, 71, 48, 88) - -[sub_resource type="AtlasTexture" id="AtlasTexture_yhtii"] -atlas = ExtResource("4_ed67f") -region = Rect2(48, 71, 48, 88) - -[sub_resource type="AtlasTexture" id="AtlasTexture_tj3uj"] -atlas = ExtResource("4_ed67f") -region = Rect2(96, 71, 47, 88) - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_p0ieu"] -resource_local_to_scene = true -shader = ExtResource("2_g7fge") -shader_parameter/blend_color = Color(0.73, 0.73, 0.73, 1) -shader_parameter/amount = 0.0 - -[sub_resource type="Resource" id="Resource_ed67f"] -resource_local_to_scene = true -script = ExtResource("3_uvlkc") -flat_value = 5.0 -percentage_value = 0.0 -mult_value = 1.0 - -[sub_resource type="Resource" id="Resource_woxi6"] -resource_local_to_scene = true -script = ExtResource("3_uvlkc") -flat_value = 0.2 -percentage_value = 0.0 -mult_value = 1.0 - -[node name="DoorZombie" instance=ExtResource("1_k7yv2")] - -[node name="Shield" type="Node2D" parent="." index="0" node_paths=PackedStringArray("_armor")] -position = Vector2(-29, 0) -script = ExtResource("2_uhol2") -_armor = NodePath("MainHP") -metadata/_custom_type_script = "uid://3tw88wj1nrj1" - -[node name="Hitbox" type="Area2D" parent="Shield" index="0"] -collision_layer = 8 -collision_mask = 0 - -[node name="CollisionShape2D" type="CollisionShape2D" parent="Shield/Hitbox" index="0"] -position = Vector2(0, -25) -shape = SubResource("RectangleShape2D_ed67f") - -[node name="MainHP" type="Node" parent="Shield" index="1"] -script = ExtResource("5_ed67f") -MaxHP = 375.0 -metadata/_custom_type_script = "uid://fd4im1fmwc5n" - -[node name="Particle" type="RigidBody2D" parent="Shield" index="2" node_paths=PackedStringArray("data")] -use_parent_material = true -position = Vector2(0, -43) -collision_layer = 128 -collision_mask = 64 -freeze = true -script = ExtResource("4_woxi6") -data = NodePath("..") -minTorque = 100.0 -maxTorque = -100.0 - -[node name="Sprite2D" type="Sprite2D" parent="Shield/Particle" index="0" node_paths=PackedStringArray("armor")] -z_index = 1 -use_parent_material = true -texture = SubResource("AtlasTexture_woxi6") -script = ExtResource("6_woxi6") -armor = NodePath("../../MainHP") -degradationStages = Array[Texture2D]([SubResource("AtlasTexture_woxi6"), SubResource("AtlasTexture_yhtii"), SubResource("AtlasTexture_tj3uj")]) -thresholdPercentage = Array[float]([1.0, 0.667, 0.333]) - -[node name="CollisionShape2D" type="CollisionShape2D" parent="Shield/Particle" index="1"] -position = Vector2(0, 18) -shape = SubResource("RectangleShape2D_ed67f") - -[node name="Observer" type="Node" parent="Shield/Particle" index="2" node_paths=PackedStringArray("_observedArmor")] -script = ExtResource("7_uhol2") -_threshold = 0.0 -_observedArmor = NodePath("../../MainHP") - -[node name="ChannelPlayer" type="Node" parent="Shield" index="3"] -script = ExtResource("7_tj3uj") -audioStream = ExtResource("8_uhol2") -channel = "metalhit" -metadata/_custom_type_script = "uid://c36bj8u7jghc7" - -[node name="CanvasGroup" parent="." index="1"] -material = SubResource("ShaderMaterial_p0ieu") - -[node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"] -scale = Vector2(0.99983, 0.99983) - -[node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"] -scale = Vector2(0.999832, 0.999832) - -[node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] -scale = Vector2(0.999831, 0.999831) - -[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.999833, 0.999833) - -[node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] -scale = Vector2(0.999829, 0.999829) - -[node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"] -scale = Vector2(0.999831, 0.999831) - -[node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"] -scale = Vector2(0.99983, 0.99983) - -[node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] -scale = Vector2(0.999828, 0.999828) - -[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.163815 -skew = -0.000518203 - -[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3"] -scale = Vector2(0.999829, 0.999829) - -[node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"] -position = Vector2(-16, -8) - -[node name="Left_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="1"] -position = Vector2(-4, -9) - -[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"] -position = Vector2(-3.00201, 2.99659) -rotation = 0.0158977 -scale = Vector2(0.99983, 0.99983) - -[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] -scale = Vector2(0.99983, 0.99983) - -[node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="4"] -scale = Vector2(0.999831, 0.999831) - -[node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"] -rotation = 0.154022 -scale = Vector2(0.999998, 0.999998) - -[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 = -0.0679757 -scale = Vector2(0.999658, 0.999658) - -[node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"] -scale = Vector2(0.999828, 0.999828) - -[node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"] -scale = Vector2(0.999828, 0.999828) - -[node name="Eatbox" parent="." index="3"] -_damage = SubResource("Resource_ed67f") - -[node name="Mover" parent="." index="5"] -_speed = SubResource("Resource_woxi6") -_speedControlMult = 1.31004 - -[connection signal="OnDamaged" from="Shield" to="Shield/ChannelPlayer" method="Play"] -[connection signal="ThresholdReached" from="Shield/Particle/Observer" to="Shield/Particle" method="FallOff"] diff --git a/scenes/entities/Zombies/hobo.tscn b/scenes/entities/Zombies/hobo.tscn index 4c4d03e..58a43f1 100644 --- a/scenes/entities/Zombies/hobo.tscn +++ b/scenes/entities/Zombies/hobo.tscn @@ -1,14 +1,17 @@ -[gd_scene load_steps=65 format=3 uid="uid://bgqmwsb6ynm81"] +[gd_scene load_steps=94 format=3 uid="uid://bgqmwsb6ynm81"] -[ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="1_fnu7s"] +[ext_resource type="Script" uid="uid://dildme6epx8l4" path="res://scripts/entities/zombies/RuntimeZombieData.cs" id="1_5h5we"] +[ext_resource type="Script" uid="uid://bcc7skl7ts6sh" path="res://scripts/systems/effects/Effect.cs" id="2_ssrsu"] [ext_resource type="Resource" uid="uid://dsg1vjx76ifgu" path="res://assets/effects/GarlicEffect.tres" id="3_b583s"] [ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/particles/FallParticle.cs" id="3_tu6af"] [ext_resource type="Script" uid="uid://c5v2og85t7s6j" path="res://scripts/entities/zombies/behaviours/HoboBehaviour.cs" id="4_5selg"] [ext_resource type="Script" uid="uid://c3cfnrmnnuqms" path="res://addons/floatmodifiers/FloatModifiers.cs" id="4_c1y3b"] +[ext_resource type="Material" uid="uid://jr0vpg030jqv" path="res://assets/ZombieMaterial.tres" id="4_ssrsu"] [ext_resource type="Script" uid="uid://fd4im1fmwc5n" path="res://scripts/entities/Armor.cs" id="4_w8pya"] [ext_resource type="Texture2D" uid="uid://dri70dxyks7xh" path="res://assets/sprites/zombies/hobo.png" id="5_b583s"] [ext_resource type="Script" uid="uid://bbw848msxb4re" path="res://scripts/entities/DegradingSprite.cs" id="5_ndwp0"] [ext_resource type="Texture2D" uid="uid://8h5vg1pk32b2" path="res://assets/sprites/garbage_can1.tres" id="6_i6nje"] +[ext_resource type="Texture2D" uid="uid://dacgbwohpmeed" path="res://assets/sprites/zombies/basic.png" id="6_ihedj"] [ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="6_vn3j1"] [ext_resource type="Texture2D" uid="uid://cogfbn4re3kob" path="res://assets/sprites/garbage_can2.tres" id="7_txjqc"] [ext_resource type="AnimationLibrary" uid="uid://ceb3khu7rwgy8" path="res://assets/animations/zombies/basic.res" id="7_vn3j1"] @@ -19,16 +22,112 @@ [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="11_7jlle"] [ext_resource type="Script" uid="uid://d3l8e8ko5r5i3" path="res://scripts/entities/ArmorHPObserver.cs" id="12_vn3j1"] [ext_resource type="AudioStream" uid="uid://ch55p7qbaawtp" path="res://assets/audio/sfx/argh.tres" id="12_w1b1s"] +[ext_resource type="Script" uid="uid://dau0tfmlfiqmo" path="res://scripts/entities/EntityHPObserver.cs" id="14_2awep"] +[ext_resource type="Script" uid="uid://dw7v3s4kbu7ma" path="res://scripts/entities/AnimationStatistics.cs" id="17_arnax"] +[ext_resource type="Script" uid="uid://dqyony6jxt2p0" path="res://scripts/entities/zombies/EatBox.cs" id="18_p6vn8"] [ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="19_8y6c0"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="20_l220p"] +[ext_resource type="Script" uid="uid://7hdj2k14lfe4" path="res://scripts/entities/zombies/ZombieMover.cs" id="21_vuumd"] +[ext_resource type="Script" uid="uid://cnn0ymuhypdff" path="res://scripts/audio/ChannelPlaylist.cs" id="22_uxp8e"] [ext_resource type="Shader" uid="uid://btf4xhu31ln6n" path="res://assets/shaders/canvas_group_flash.gdshader" id="23_nc6p3"] +[ext_resource type="AudioStream" uid="uid://bg76miyscfvhu" path="res://assets/audio/sfx/groan.tres" id="26_i0ku7"] +[ext_resource type="Script" uid="uid://b8r6fxsfjdo3a" path="res://scripts/audio/EffectBasedPlayer.cs" id="30_pilme"] +[ext_resource type="Resource" uid="uid://7uj0oe656jfx" path="res://assets/effects/SnowSlow.tres" id="31_y40pw"] +[ext_resource type="AudioStream" uid="uid://dt13iugnnx4op" path="res://assets/audio/sfx/yuck_generic.tres" id="32_xr8w3"] +[ext_resource type="AudioStream" uid="uid://bjotp63arocci" path="res://assets/audio/sfx/frozen.mp3" id="33_6wb5p"] +[ext_resource type="Script" uid="uid://c1x4n4nqyq72f" path="res://scripts/audio/ChannelSettings.cs" id="34_1p6mb"] +[ext_resource type="Script" uid="uid://dk32ln8c2574d" path="res://scripts/entities/zombies/ZombieKillHandler.cs" id="35_jg5ia"] -[sub_resource type="ShaderMaterial" id="ShaderMaterial_vn3j1"] -resource_local_to_scene = true -shader = ExtResource("23_nc6p3") -shader_parameter/FLASH_COLOR = Color(1, 0.709804, 0.439216, 0.5) -shader_parameter/HIGHLIGHT_COLOR = Color(1, 0.709804, 0.439216, 0.5) -shader_parameter/blend = 0.0 -shader_parameter/selected = false +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_wn68q"] +tip_nodepath = NodePath("Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 17 +joint_data/0/bone2d_node = NodePath("Butt/Body/LeftUpperArm/LeftLowerArm") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = true +joint_data/0/constraint_angle_min = 0.0 +joint_data/0/constraint_angle_max = 90.0 +joint_data/0/constraint_angle_invert = false +joint_data/0/constraint_in_localspace = true +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 16 +joint_data/1/bone2d_node = NodePath("Butt/Body/LeftUpperArm") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = false +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false + +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_x5uj2"] +tip_nodepath = NodePath("Butt/Body/RightUpperArm/RightLowerArm/RightHand") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 8 +joint_data/0/bone2d_node = NodePath("Butt/Body/RightUpperArm") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = false +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 9 +joint_data/1/bone2d_node = NodePath("Butt/Body/RightUpperArm/RightLowerArm") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = true +joint_data/1/constraint_angle_min = 0.0 +joint_data/1/constraint_angle_max = 90.0 +joint_data/1/constraint_angle_invert = false +joint_data/1/constraint_in_localspace = true +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false + +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_vcc72"] +tip_nodepath = NodePath("Butt/RightUpperLeg/RightLowerLeg/RightFoot") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 1 +joint_data/0/bone2d_node = NodePath("Butt/RightUpperLeg") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = true +joint_data/0/constraint_angle_min = -90.0 +joint_data/0/constraint_angle_max = 90.0 +joint_data/0/constraint_angle_invert = true +joint_data/0/constraint_in_localspace = true +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 2 +joint_data/1/bone2d_node = NodePath("Butt/RightUpperLeg/RightLowerLeg") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = true +joint_data/1/constraint_angle_min = 0.0 +joint_data/1/constraint_angle_max = 160.0 +joint_data/1/constraint_angle_invert = false +joint_data/1/constraint_in_localspace = true +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false + +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_kto0i"] +tip_nodepath = NodePath("Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 4 +joint_data/0/bone2d_node = NodePath("Butt/LeftUpperLeg") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = true +joint_data/0/constraint_angle_min = -90.0 +joint_data/0/constraint_angle_max = 90.0 +joint_data/0/constraint_angle_invert = true +joint_data/0/constraint_in_localspace = true +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 5 +joint_data/1/bone2d_node = NodePath("Butt/LeftUpperLeg/LeftLowerLeg") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = true +joint_data/1/constraint_angle_min = -90.0 +joint_data/1/constraint_angle_max = 0.0 +joint_data/1/constraint_angle_invert = true +joint_data/1/constraint_in_localspace = true +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false + +[sub_resource type="SkeletonModificationStack2D" id="SkeletonModificationStack2D_wn68q"] +modification_count = 4 +modifications/0 = SubResource("SkeletonModification2DCCDIK_wn68q") +modifications/1 = SubResource("SkeletonModification2DCCDIK_x5uj2") +modifications/2 = SubResource("SkeletonModification2DCCDIK_vcc72") +modifications/3 = SubResource("SkeletonModification2DCCDIK_kto0i") [sub_resource type="AtlasTexture" id="AtlasTexture_txjqc"] atlas = ExtResource("5_b583s") @@ -74,6 +173,10 @@ region = Rect2(91, 32, 9, 15) atlas = ExtResource("5_b583s") region = Rect2(137, 19, 29, 39) +[sub_resource type="AtlasTexture" id="AtlasTexture_e7wc3"] +atlas = ExtResource("6_ihedj") +region = Rect2(72, 2, 13, 26) + [sub_resource type="AtlasTexture" id="AtlasTexture_5selg"] atlas = ExtResource("5_b583s") region = Rect2(0, 29, 35, 11) @@ -82,20 +185,30 @@ region = Rect2(0, 29, 35, 11) radius = 17.0 height = 48.0 -[sub_resource type="AtlasTexture" id="AtlasTexture_pjhfy"] -atlas = ExtResource("5_b583s") -region = Rect2(80, 0, 32, 30) - -[sub_resource type="AtlasTexture" id="AtlasTexture_7cvmi"] -atlas = ExtResource("5_b583s") -region = Rect2(38, 22, 22, 13) - [sub_resource type="AtlasTexture" id="AtlasTexture_n380g"] atlas = ExtResource("5_b583s") region = Rect2(34, 38, 45, 27) [sub_resource type="CircleShape2D" id="CircleShape2D_vn3j1"] +[sub_resource type="AtlasTexture" id="AtlasTexture_pjhfy"] +atlas = ExtResource("5_b583s") +region = Rect2(80, 0, 32, 30) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vcc72"] +atlas = ExtResource("6_ihedj") +region = Rect2(93, 3, 2, 3) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kto0i"] +atlas = ExtResource("6_ihedj") +region = Rect2(105, 2, 3, 4) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7cvmi"] +atlas = ExtResource("5_b583s") +region = Rect2(38, 22, 22, 13) + +[sub_resource type="CircleShape2D" id="CircleShape2D_dn8ha"] + [sub_resource type="AtlasTexture" id="AtlasTexture_tebih"] atlas = ExtResource("5_b583s") region = Rect2(34, 0, 6, 19) @@ -108,6 +221,10 @@ region = Rect2(43, 0, 9, 15) atlas = ExtResource("5_b583s") region = Rect2(55, 0, 9, 10) +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ccrjo"] +radius = 3.00026 +height = 16.007 + [sub_resource type="Animation" id="Animation_vn3j1"] resource_name = "RESET" tracks/0/type = "value" @@ -656,6 +773,9 @@ _data = { &"RESET": SubResource("Animation_vn3j1") } +[sub_resource type="RectangleShape2D" id="RectangleShape2D_hxyad"] +size = Vector2(26, 48) + [sub_resource type="Resource" id="Resource_n380g"] resource_local_to_scene = true script = ExtResource("4_c1y3b") @@ -663,6 +783,9 @@ flat_value = 5.0 percentage_value = 0.0 mult_value = 1.0 +[sub_resource type="RectangleShape2D" id="RectangleShape2D_r4ug6"] +size = Vector2(16, 48) + [sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_2q05d"] [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_vn3j1"] @@ -757,85 +880,206 @@ flat_value = 0.4 percentage_value = 0.0 mult_value = 1.0 -[node name="Hobo" node_paths=PackedStringArray("_armor") instance=ExtResource("1_fnu7s")] +[sub_resource type="Resource" id="Resource_dn8ha"] +script = ExtResource("34_1p6mb") +restartTreshold = -1.0 +metadata/_custom_type_script = "uid://c1x4n4nqyq72f" + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_vn3j1"] +resource_local_to_scene = true +shader = ExtResource("23_nc6p3") +shader_parameter/FLASH_COLOR = Color(1, 0.709804, 0.439216, 0.5) +shader_parameter/HIGHLIGHT_COLOR = Color(1, 0.709804, 0.439216, 0.5) +shader_parameter/blend = 0.0 +shader_parameter/selected = false + +[node name="Hobo" type="Node2D" node_paths=PackedStringArray("_armor", "_player", "_tree")] +y_sort_enabled = true +script = ExtResource("1_5h5we") _armor = NodePath("CanArmor") MaxHP = 185.0 -_effectImmunities = [ExtResource("3_b583s")] +_player = NodePath("CanvasGroup/basic_zombie_walk/AnimationPlayer") +_tree = NodePath("AnimationTree") +_effectImmunities = Array[ExtResource("2_ssrsu")]([ExtResource("3_b583s")]) +metadata/_edit_vertical_guides_ = [-159.0] -[node name="CanvasGroup" parent="." index="0"] -material = SubResource("ShaderMaterial_vn3j1") +[node name="CanvasGroup" type="CanvasGroup" parent="."] +material = ExtResource("4_ssrsu") -[node name="Butt" parent="CanvasGroup/basic_zombie_walk/Zombie" index="0"] +[node name="basic_zombie_walk" type="Node2D" parent="CanvasGroup"] + +[node name="Zombie" type="Skeleton2D" parent="CanvasGroup/basic_zombie_walk"] +use_parent_material = true +modification_stack = SubResource("SkeletonModificationStack2D_wn68q") + +[node name="Butt" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie"] +use_parent_material = true +position = Vector2(5, -35) scale = Vector2(0.999902, 0.999902) +rest = Transform2D(1, 0, 0, 1, 5, -35) +editor_settings/show_bone_gizmo = false -[node name="Butt" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="0"] +[node name="Butt" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] +use_parent_material = true texture = SubResource("AtlasTexture_txjqc") +centered = false +offset = Vector2(-10, -3) +metadata/_edit_lock_ = true -[node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"] -scale = Vector2(0.999831, 0.999831) - -[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.999832, 0.999832) - -[node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] -scale = Vector2(0.999835, 0.999835) - -[node name="Right_Foot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot" index="0"] -texture = SubResource("AtlasTexture_uoit3") - -[node name="Right_Lower_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="1"] -texture = SubResource("AtlasTexture_vn3j1") - -[node name="LeftUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="2"] +[node name="RightUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] +use_parent_material = true +position = Vector2(-6, 3) scale = Vector2(0.99983, 0.99983) +rest = Transform2D(1, 0, 0, 1, -6, 3) +editor_settings/show_bone_gizmo = false -[node name="Left_Upper_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="0"] +[node name="Right_Upper_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg"] +texture = SubResource("AtlasTexture_b583s") +centered = false +offset = Vector2(-6, -2) +metadata/_edit_lock_ = true + +[node name="RightLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg"] +position = Vector2(-2, 12) +scale = Vector2(0.99983, 0.99983) +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.99983, 0.99983) +rest = Transform2D(1, 0, 0, 1, -2, 14) +auto_calculate_length_and_angle = false +length = 12.0 +bone_angle = 0.0 +editor_settings/show_bone_gizmo = false + +[node name="Right_Foot" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot"] +texture = SubResource("AtlasTexture_uoit3") +centered = false +offset = Vector2(-4, -3) +metadata/_edit_lock_ = true + +[node name="Right_Lower_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg"] +position = Vector2(-18, -2) +texture = SubResource("AtlasTexture_vn3j1") +centered = false +offset = Vector2(12, 1) +metadata/_edit_lock_ = true + +[node name="LeftUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] +use_parent_material = true +position = Vector2(6, 4) +scale = Vector2(0.999826, 0.999826) +rest = Transform2D(1, 0, 0, 1, 6, 4) +editor_settings/show_bone_gizmo = false + +[node name="Left_Upper_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg"] texture = SubResource("AtlasTexture_yb81c") +centered = false +offset = Vector2(-4, -2) +metadata/_edit_lock_ = true -[node name="LeftLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="1"] -scale = Vector2(0.999832, 0.999832) - -[node name="Left_Lower_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="0"] -texture = SubResource("AtlasTexture_nlwsb") - -[node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] -scale = Vector2(0.999814, 0.999814) - -[node name="Left_Foot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot" index="0"] -texture = SubResource("AtlasTexture_8y6c0") - -[node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"] -scale = Vector2(0.999824, 0.999824) - -[node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"] +[node name="LeftLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg"] +position = Vector2(-1, 13) scale = Vector2(0.999827, 0.999827) +rest = Transform2D(1, 0, 0, 1, -1, 13) +editor_settings/show_bone_gizmo = false -[node name="Right_Upper_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="0"] +[node name="Left_Lower_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg"] +texture = SubResource("AtlasTexture_nlwsb") +centered = false +offset = Vector2(-1, 0) +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.999821, 0.999821) +rest = Transform2D(1, 0, 0, 1, 6, 10) +auto_calculate_length_and_angle = false +length = 12.0 +bone_angle = 160.0 +editor_settings/show_bone_gizmo = false + +[node name="Left_Foot" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot"] +texture = SubResource("AtlasTexture_8y6c0") +centered = false +offset = Vector2(-14, -3) +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.999825, 0.999825) +rest = Transform2D(1, 0, 0, 1, 1, -2) +editor_settings/show_bone_gizmo = false + +[node name="RightUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +use_parent_material = true +position = Vector2(-14, -23) +scale = Vector2(0.999827, 0.999827) +rest = Transform2D(1, 0, 0, 1, -14, -23) +editor_settings/show_bone_gizmo = false + +[node name="Right_Upper_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"] texture = SubResource("AtlasTexture_nc6p3") +centered = false +offset = Vector2(-4, -2) +metadata/_edit_lock_ = true -[node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] -scale = Vector2(0.999815, 0.999815) +[node name="RightLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"] +position = Vector2(-2, 15) +scale = Vector2(0.999816, 0.999816) +rest = Transform2D(1, 0, 0, 1, -2, 15) +editor_settings/show_bone_gizmo = false -[node name="Right_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand" index="0"] +[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) +rest = Transform2D(1, 0, 0, 1, -1, 13) +auto_calculate_length_and_angle = false +length = 8.0 +bone_angle = 90.0 +editor_settings/show_bone_gizmo = false + +[node name="Right_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand"] texture = SubResource("AtlasTexture_y0p2l") +centered = false +offset = Vector2(-4, -2) +metadata/_edit_lock_ = true -[node name="Right_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="1"] +[node name="Right_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm"] texture = SubResource("AtlasTexture_op0h6") +centered = false +offset = Vector2(-5, -1) +metadata/_edit_lock_ = true -[node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="1"] +[node name="Body" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +rotation = 0.00163735 texture = SubResource("AtlasTexture_0s5wm") +centered = false +offset = Vector2(-15, -27) +metadata/_edit_lock_ = true -[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] -rotation = 0.0332545 +[node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +position = Vector2(-9, -21) +rotation = 0.00541537 scale = Vector2(1e-05, 1e-05) +skew = -0.000476122 +rest = Transform2D(1, 0, 0, 1, -9, -21) +auto_calculate_length_and_angle = false +length = 24.0 +bone_angle = 100.0 +editor_settings/show_bone_gizmo = false -[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Tie" index="0"] +[node name="Tie" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Tie"] visible = false +texture = SubResource("AtlasTexture_e7wc3") +centered = false +offset = Vector2(-10, -1) +metadata/_edit_lock_ = true -[node name="Can" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3" node_paths=PackedStringArray("data")] +[node name="Can" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" node_paths=PackedStringArray("data")] scale = Vector2(1.00027, 1.00027) collision_layer = 128 collision_mask = 64 @@ -847,7 +1091,7 @@ minTorque = -45.0 maxTorque = 45.0 Impulse = 100.0 -[node name="Sprite2D" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Can" index="0" node_paths=PackedStringArray("armor")] +[node name="Sprite2D" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Can" node_paths=PackedStringArray("armor")] material = ExtResource("6_vn3j1") position = Vector2(-5.9999, -4.5002) texture = ExtResource("6_i6nje") @@ -856,43 +1100,42 @@ armor = NodePath("../../../../../../../CanArmor") degradationStages = Array[Texture2D]([ExtResource("6_i6nje"), ExtResource("7_txjqc"), ExtResource("8_b583s")]) thresholdPercentage = Array[float]([1.0, 0.667, 0.333]) -[node name="Sprite2D2" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Can" index="1"] -z_index = -1 +[node name="Sprite2D2" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Can"] material = ExtResource("6_vn3j1") position = Vector2(-7.4999, -27.5002) texture = SubResource("AtlasTexture_5selg") -[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Can" index="2"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Can"] position = Vector2(-4.9999, -5.0002) shape = SubResource("CapsuleShape2D_4248q") -[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle" index="0"] -texture = SubResource("AtlasTexture_pjhfy") +[node name="Head" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +position = Vector2(-10, -25) +scale = Vector2(0.999829, 0.999829) +rest = Transform2D(1, 0, 0, 1, -10, -25) +editor_settings/show_bone_gizmo = false -[node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"] -position = Vector2(-16, -8.00001) +[node name="HeadParticle" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" node_paths=PackedStringArray("data")] +collision_layer = 128 +collision_mask = 64 +freeze = true +script = ExtResource("3_tu6af") +data = NodePath("../../../../../../..") +maxAngle = 45.0 +minTorque = -45.0 +maxTorque = 45.0 +Impulse = 100.0 -[node name="Left_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="1"] -position = Vector2(-4, -9) - -[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"] -position = Vector2(-3, 3) -rotation = -0.0540862 -scale = Vector2(0.999834, 0.999834) -texture = SubResource("AtlasTexture_7cvmi") -offset = Vector2(-14, -2) - -[node name="TrashcanLid" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="3" node_paths=PackedStringArray("data")] -position = Vector2(-3, 3) +[node name="TrashcanLid" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle" node_paths=PackedStringArray("data")] +position = Vector2(-3, 3.00001) scale = Vector2(0.999826, 0.999826) collision_layer = 128 collision_mask = 64 freeze = true script = ExtResource("3_tu6af") -data = NodePath("../../../../../../../../..") +data = NodePath("../../../../../../../..") -[node name="Trashcan_lid" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid" index="0"] -z_index = -1 +[node name="Trashcan_lid" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/TrashcanLid"] material = ExtResource("6_vn3j1") position = Vector2(2.99822, -20.0166) scale = Vector2(1, 1) @@ -900,19 +1143,90 @@ texture = SubResource("AtlasTexture_n380g") offset = Vector2(-0.5, -0.5) metadata/_edit_lock_ = true -[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid" index="1"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/TrashcanLid"] position = Vector2(2.99791, -20.018) shape = SubResource("CircleShape2D_vn3j1") -[node name="Observer" type="Node" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid" index="2" node_paths=PackedStringArray("_observedArmor")] +[node name="Observer" type="Node" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/TrashcanLid" node_paths=PackedStringArray("_observedArmor")] script = ExtResource("12_vn3j1") _threshold = 0.333 -_observedArmor = NodePath("../../../../../../../../../../CanArmor") +_observedArmor = NodePath("../../../../../../../../../CanArmor") -[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] -scale = Vector2(0.999834, 0.999834) +[node name="Head" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle"] +texture = SubResource("AtlasTexture_pjhfy") +centered = false +offset = Vector2(-20, -24) +metadata/_edit_lock_ = true -[node name="TrashcanLid" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="4"] +[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) +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, 3) +rotation = -0.00880774 +scale = Vector2(0.999828, 0.999828) +texture = SubResource("AtlasTexture_7cvmi") +centered = false +offset = Vector2(-14, -2) +metadata/_edit_lock_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle"] +position = Vector2(-4.58496, -8.21035) +shape = SubResource("CircleShape2D_dn8ha") + +[node name="Observer" type="Node" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle" node_paths=PackedStringArray("_observedEntity")] +script = ExtResource("14_2awep") +_threshold = 0.0 +_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) +rest = Transform2D(1, 0, 0, 1, -3, 3) +auto_calculate_length_and_angle = false +length = 11.0 +bone_angle = 180.0 +editor_settings/show_bone_gizmo = false + +[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Jaw"] +remote_path = NodePath("../../HeadParticle/Head/Jaw") + +[node name="RightEye" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] +position = Vector2(-16, -8) +rest = Transform2D(1, 0, 0, 1, -16, -8) +auto_calculate_length_and_angle = false +length = 2.0 +bone_angle = 180.0 +editor_settings/show_bone_gizmo = false + +[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/RightEye"] +remote_path = NodePath("../../HeadParticle/Head/Right_Eye") + +[node name="LeftEye" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] +position = Vector2(-4, -9) +rest = Transform2D(1, 0, 0, 1, -4, -9) +auto_calculate_length_and_angle = false +length = 2.0 +bone_angle = 180.0 +editor_settings/show_bone_gizmo = false + +[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/LeftEye"] +remote_path = NodePath("../../HeadParticle/Head/Left_Eye") + +[node name="TrashcanLid" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] position = Vector2(-0.0022974, -17.0131) scale = Vector2(0.999828, 0.999828) rest = Transform2D(1, 0, 0, 1, -0.0022974, -17.0131) @@ -921,84 +1235,195 @@ length = 12.0 bone_angle = 180.0 editor_settings/show_bone_gizmo = false -[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/TrashcanLid" index="0"] -remote_path = NodePath("../../HeadParticle/Head/TrashcanLid/Trashcan_lid") +[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/TrashcanLid"] +remote_path = NodePath("../../HeadParticle/TrashcanLid/Trashcan_lid") -[node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="5"] -scale = Vector2(0.999825, 0.999825) +[node name="LeftUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +position = Vector2(-1, -20) +scale = Vector2(0.999826, 0.999826) +rest = Transform2D(1, 0, 0, 1, -1, -20) +editor_settings/show_bone_gizmo = false -[node name="Left_Upper_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="0"] +[node name="Left_Upper_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm"] +position = Vector2(-37, 10) texture = SubResource("AtlasTexture_tebih") +centered = false +offset = Vector2(33, -12) +metadata/_edit_lock_ = true -[node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"] -rotation = 0.0299982 -scale = Vector2(0.999995, 0.999995) +[node name="HandProjectile" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" node_paths=PackedStringArray("data")] +position = Vector2(-2, 14) +collision_layer = 128 +collision_mask = 64 +freeze = true +script = ExtResource("3_tu6af") +data = NodePath("../../../../../../..") +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.0048851 +scale = Vector2(0.999996, 0.999996) texture = SubResource("AtlasTexture_auxav") +centered = false +offset = Vector2(-5, 0) +metadata/_edit_lock_ = true -[node name="Left_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm" index="0"] +[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.0 scale = Vector2(0.999652, 0.999652) texture = SubResource("AtlasTexture_dntsa") +centered = false +offset = Vector2(-4, -1) +metadata/_edit_lock_ = true -[node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"] -scale = Vector2(0.999825, 0.999825) +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"] +position = Vector2(-0.00104554, 13.0063) +shape = SubResource("CapsuleShape2D_ccrjo") -[node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"] +[node name="Observer" type="Node" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" node_paths=PackedStringArray("_observedEntity")] +script = ExtResource("14_2awep") +_observedEntity = NodePath("../../../../../../../..") + +[node name="LeftLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm"] +position = Vector2(-2, 14) +scale = Vector2(0.999826, 0.999826) +rest = Transform2D(1, 0, 0, 1, -2, 14) +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.999822, 0.999822) +rest = Transform2D(1, 0, 0, 1, -1, 13) +auto_calculate_length_and_angle = false +length = 6.0 +bone_angle = 90.0 +editor_settings/show_bone_gizmo = false -[node name="AnimationPlayer" parent="CanvasGroup/basic_zombie_walk" index="1"] +[node name="Left_Hand_Remote" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand"] +remote_path = NodePath("../../../HandProjectile/Left_Lower_Arm/Left_Hand") + +[node name="Left_Lower_Arm_Remote" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm"] +scale = Vector2(1.00017, 1.00017) +remote_path = NodePath("../../HandProjectile/Left_Lower_Arm") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="CanvasGroup/basic_zombie_walk"] libraries = { &"": SubResource("AnimationLibrary_x5uj2"), &"basic": ExtResource("7_vn3j1"), &"hobo": ExtResource("8_yb81c") } -[node name="EatingStatistics" parent="CanvasGroup/basic_zombie_walk/AnimationPlayer" index="0"] +[node name="EatingStatistics" type="Node" parent="CanvasGroup/basic_zombie_walk/AnimationPlayer"] +script = ExtResource("17_arnax") animationName = "hobo/eating_without_arms" +trackToFind = "../../Eatbox" -[node name="Eatbox" parent="." index="2"] +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 8 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] +position = Vector2(4, -24) +shape = SubResource("RectangleShape2D_hxyad") + +[node name="Eatbox" type="Area2D" parent="."] +collision_layer = 0 +collision_mask = 2 +script = ExtResource("18_p6vn8") _damage = SubResource("Resource_n380g") -[node name="AnimationTree" parent="." index="3"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="Eatbox"] +position = Vector2(-10, -24) +shape = SubResource("RectangleShape2D_r4ug6") + +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] +root_node = NodePath("../CanvasGroup/basic_zombie_walk") tree_root = SubResource("AnimationNodeBlendTree_txjqc") advance_expression_base_node = NodePath("../Behaviour") +anim_player = NodePath("../CanvasGroup/basic_zombie_walk/AnimationPlayer") +parameters/TimeScale/scale = 1.0 +script = ExtResource("20_l220p") +entity = NodePath("..") -[node name="Mover" parent="." index="4"] +[node name="Mover" type="Node" parent="."] +script = ExtResource("21_vuumd") _speed = SubResource("Resource_4248q") -_speedControlMult = 0.0 -[node name="HitPlayer" parent="." index="5"] +[node name="HitPlayer" type="Node" parent="."] +script = ExtResource("22_uxp8e") playlist = Array[AudioStream]([ExtResource("8_4248q"), ExtResource("9_tu6af")]) channels = Array[String](["metal_hit", "hit"]) +metadata/_custom_type_script = "uid://c36bj8u7jghc7" -[node name="CanArmor" type="Node" parent="." index="7"] +[node name="GroanPlayer" type="Node" parent="."] +script = ExtResource("11_7jlle") +audioStream = ExtResource("26_i0ku7") +channel = "groan" +metadata/_custom_type_script = "uid://c36bj8u7jghc7" + +[node name="Timer" type="Timer" parent="GroanPlayer"] +wait_time = 20.0 + +[node name="StartTimer" type="Timer" parent="GroanPlayer/Timer"] +wait_time = 5.0 +one_shot = true +autostart = true + +[node name="CanArmor" type="Node" parent="."] script = ExtResource("4_w8pya") MaxHP = 550.0 metadata/_custom_type_script = "uid://fd4im1fmwc5n" -[node name="FlashController" type="Node" parent="CanArmor" index="0"] +[node name="FlashController" type="Node" parent="CanArmor"] script = ExtResource("19_8y6c0") shaderMaterial = ExtResource("6_vn3j1") -[node name="Behaviour" type="Node" parent="." index="8" node_paths=PackedStringArray("_eatBox", "_animationTree")] +[node name="Behaviour" type="Node" parent="." node_paths=PackedStringArray("_eatBox", "_animationTree")] script = ExtResource("4_5selg") _eatBox = NodePath("../Eatbox") _animationTree = NodePath("../AnimationTree") -[node name="RipPlayer" type="Node" parent="." index="11"] +[node name="EffectPlayer" type="Node" parent="."] +script = ExtResource("30_pilme") +effectsToMap = Array[Resource]([ExtResource("3_b583s"), ExtResource("31_y40pw")]) +streamsToMapTo = Array[AudioStream]([ExtResource("32_xr8w3"), ExtResource("33_6wb5p")]) +streamSettings = Array[Object]([null, SubResource("Resource_dn8ha")]) + +[node name="DeathHandler" type="Node" parent="." node_paths=PackedStringArray("_tree", "_collider")] +script = ExtResource("35_jg5ia") +_tree = NodePath("../AnimationTree") +_collider = NodePath("../Hitbox/CollisionShape2D") + +[node name="RipPlayer" type="Node" parent="."] script = ExtResource("11_7jlle") audioStream = ExtResource("12_w1b1s") channel = "anger" metadata/_custom_type_script = "uid://c36bj8u7jghc7" -[node name="FlashController" parent="." index="12"] +[node name="FlashController" type="Node" parent="."] +script = ExtResource("19_8y6c0") shaderMaterial = SubResource("ShaderMaterial_vn3j1") -[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="ArmorLost" from="CanArmor" to="HitPlayer" method="Next"] +[connection signal="HasBeenKilled" from="." to="DeathHandler" method="OnKilled"] +[connection signal="OnDamaged" from="." to="HitPlayer" method="Play"] +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/TrashcanLid/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/TrashcanLid" method="FallOff"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/TrashcanLid/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/TrashcanLid/RemoteTransform2D" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle" method="FallOff"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Jaw/RemoteTransform2D" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/RightEye/RemoteTransform2D" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/LeftEye/RemoteTransform2D" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" method="FallOff"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand/Left_Hand_Remote" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/Left_Lower_Arm_Remote" method="queue_free"] +[connection signal="area_entered" from="Eatbox" to="Eatbox" method="OnAreaEntered"] +[connection signal="area_exited" from="Eatbox" to="Eatbox" method="OnAreaExited"] +[connection signal="timeout" from="GroanPlayer/Timer" to="GroanPlayer" method="Play"] +[connection signal="timeout" from="GroanPlayer/Timer/StartTimer" to="GroanPlayer/Timer" method="start"] [connection signal="ArmorLost" from="CanArmor" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Can" method="FallOff"] +[connection signal="ArmorLost" from="CanArmor" to="HitPlayer" method="Next"] [connection signal="ArmorLost" from="CanArmor" to="Behaviour" method="Trashed"] [connection signal="Damaged" from="CanArmor" to="HitPlayer" method="Play"] [connection signal="Damaged" from="CanArmor" to="CanArmor/FlashController" method="DamageFlash"] diff --git a/scenes/entities/Zombies/zombie.tscn b/scenes/entities/Zombies/zombie.tscn index 88699b8..7d18c53 100644 --- a/scenes/entities/Zombies/zombie.tscn +++ b/scenes/entities/Zombies/zombie.tscn @@ -827,13 +827,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.999835, 0.999835) +scale = Vector2(0.999832, 0.999832) 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.999833, 0.999833) +scale = Vector2(0.999831, 0.999831) rest = Transform2D(1, 0, 0, 1, -2, 14) auto_calculate_length_and_angle = false length = 12.0 @@ -868,7 +868,7 @@ metadata/_edit_lock_ = true [node name="LeftLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg"] position = Vector2(-1, 13) -scale = Vector2(0.999834, 0.999834) +scale = Vector2(0.999832, 0.999832) rest = Transform2D(1, 0, 0, 1, -1, 13) editor_settings/show_bone_gizmo = false @@ -880,7 +880,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.99983, 0.99983) rest = Transform2D(1, 0, 0, 1, 6, 10) auto_calculate_length_and_angle = false length = 12.0 @@ -896,15 +896,14 @@ 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.999828, 0.999828) +scale = Vector2(0.999827, 0.999827) rest = Transform2D(1, 0, 0, 1, 1, -2) editor_settings/show_bone_gizmo = false [node name="RightUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] -z_index = -1 use_parent_material = true position = Vector2(-14, -23) -scale = Vector2(0.999828, 0.999828) +scale = Vector2(0.999829, 0.999829) rest = Transform2D(1, 0, 0, 1, -14, -23) editor_settings/show_bone_gizmo = false @@ -916,13 +915,13 @@ metadata/_edit_lock_ = true [node name="RightLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"] position = Vector2(-2, 15) -scale = Vector2(0.999829, 0.999829) +scale = Vector2(0.999827, 0.999827) rest = Transform2D(1, 0, 0, 1, -2, 15) 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.99983, 0.99983) rest = Transform2D(1, 0, 0, 1, -1, 13) auto_calculate_length_and_angle = false length = 8.0 @@ -950,8 +949,8 @@ metadata/_edit_lock_ = true [node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] position = Vector2(-9, -21) -rotation = 0.0871529 -skew = -0.000476122 +rotation = -0.0127525 +skew = -0.000478387 rest = Transform2D(1, 0, 0, 1, -9, -21) auto_calculate_length_and_angle = false length = 24.0 @@ -988,25 +987,23 @@ offset = Vector2(-20, -24) 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) +position = Vector2(-16, -8.00001) texture = SubResource("AtlasTexture_vcc72") centered = false offset = Vector2(-2, -2) 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) +position = Vector2(-4, -9.00001) 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.00107, 2.99818) -rotation = 0.00845789 -scale = Vector2(0.999829, 0.999829) +position = Vector2(-2.98416, 2.96178) +rotation = -0.0089077 +scale = Vector2(0.999826, 0.999826) texture = SubResource("AtlasTexture_x5uj2") centered = false offset = Vector2(-12, -2) @@ -1023,7 +1020,7 @@ _observedEntity = NodePath("../../../../../../../..") [node name="Jaw" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] position = Vector2(-3, 3) -scale = Vector2(0.99983, 0.99983) +scale = Vector2(0.999826, 0.999826) rest = Transform2D(1, 0, 0, 1, -3, 3) auto_calculate_length_and_angle = false length = 11.0 @@ -1057,7 +1054,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.999831, 0.999831) +scale = Vector2(0.99983, 0.99983) rest = Transform2D(1, 0, 0, 1, -1, -20) editor_settings/show_bone_gizmo = false @@ -1079,8 +1076,8 @@ 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.0819429 -scale = Vector2(0.999998, 0.999998) +rotation = -0.0135165 +scale = Vector2(0.999999, 0.999999) texture = SubResource("AtlasTexture_auqeq") centered = false offset = Vector2(-5, 0) @@ -1089,8 +1086,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.0361645 -scale = Vector2(0.999656, 0.999656) +rotation = -0.0111417 +scale = Vector2(0.99966, 0.99966) texture = SubResource("AtlasTexture_vlvtp") centered = false offset = Vector2(-4, -1) @@ -1106,13 +1103,13 @@ _observedEntity = NodePath("../../../../../../../..") [node name="LeftLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm"] position = Vector2(-2, 14) -scale = Vector2(0.999828, 0.999828) +scale = Vector2(0.999829, 0.999829) rest = Transform2D(1, 0, 0, 1, -2, 14) 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.999826, 0.999826) +scale = Vector2(0.999829, 0.999829) rest = Transform2D(1, 0, 0, 1, -1, 13) auto_calculate_length_and_angle = false length = 6.0 @@ -1167,7 +1164,6 @@ entity = NodePath("..") [node name="Mover" type="Node" parent="."] script = ExtResource("4_u5syx") _speed = SubResource("Resource_ckb7n") -_speedControlMult = 0.271112 [node name="HitPlayer" type="Node" parent="."] script = ExtResource("12_he8da") diff --git a/scenes/entities/plants/aloe.tscn b/scenes/entities/plants/aloe.tscn index b9b8369..5215df8 100644 --- a/scenes/entities/plants/aloe.tscn +++ b/scenes/entities/plants/aloe.tscn @@ -1,19 +1,13 @@ -[gd_scene load_steps=23 format=3 uid="uid://bw1w8jp0yeypy"] +[gd_scene load_steps=24 format=3 uid="uid://bw1w8jp0yeypy"] -[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_n25yi"] -[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_dm0tl"] +[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_8fr1j"] +[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_aimqk"] [ext_resource type="Texture2D" uid="uid://b6tyoa5htapir" path="res://assets/sprites/atlases/plants/aloe.png" id="2_iup5p"] [ext_resource type="AnimationLibrary" uid="uid://bgutjc3ruq27s" path="res://assets/animations/plants/aloe.res" id="3_3sp3b"] [ext_resource type="Script" uid="uid://cljytsmqac0w7" path="res://scripts/entities/plants/behaviours/AloeBehaviour.cs" id="4_55asm"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="4_aimqk"] [ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="5_gfy6j"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_8fr1j"] -resource_local_to_scene = true -shader = ExtResource("2_dm0tl") -shader_parameter/FLASH_COLOR = Color(1, 0.709804, 0.439216, 0.5) -shader_parameter/HIGHLIGHT_COLOR = Color(1, 0.709804, 0.439216, 0.5) -shader_parameter/selected = false -shader_parameter/blend = 0.0 +[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="7_vpcbp"] [sub_resource type="Animation" id="Animation_vknky"] length = 0.001 @@ -103,43 +97,54 @@ node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_oe0dc"] size = Vector2(22, 32) -[node name="Aloe" instance=ExtResource("1_n25yi")] -internal_id = "aloe" +[node name="Aloe" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] +script = ExtResource("1_8fr1j") MaxHP = 30.0 +_player = NodePath("AnimationPlayer") +_tree = NodePath("AnimationTree") -[node name="Sprite2D" parent="." index="0"] -material = SubResource("ShaderMaterial_8fr1j") +[node name="Sprite2D" type="Sprite2D" parent="."] +material = ExtResource("2_aimqk") position = Vector2(9, -14) texture = ExtResource("2_iup5p") hframes = 8 vframes = 4 -[node name="AnimationPlayer" parent="." index="1"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { &"": SubResource("AnimationLibrary_wlien"), &"aloe": ExtResource("3_3sp3b") } -[node name="AnimationTree" parent="." index="2"] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] tree_root = SubResource("AnimationNodeBlendTree_gfy6j") +anim_player = NodePath("../AnimationPlayer") parameters/TimeScale/scale = 1.0 parameters/Tree/conditions/charged = false parameters/Tree/conditions/heal = false +script = ExtResource("4_aimqk") +entity = NodePath("..") -[node name="Behaviour" type="Node" parent="." index="3"] +[node name="Behaviour" type="Node" parent="."] script = ExtResource("4_55asm") _hpTreshold = 0.5 -[node name="Timer" type="Timer" parent="Behaviour" index="0" node_paths=PackedStringArray("entity")] +[node name="Timer" type="Timer" parent="Behaviour" node_paths=PackedStringArray("entity")] wait_time = 15.0 one_shot = true script = ExtResource("5_gfy6j") entity = NodePath("../..") -[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] shape = SubResource("RectangleShape2D_oe0dc") -[node name="FlashController" parent="." index="5"] -shaderMaterial = SubResource("ShaderMaterial_8fr1j") +[node name="FlashController" type="Node" parent="."] +script = ExtResource("7_vpcbp") +shaderMaterial = ExtResource("2_aimqk") +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] [connection signal="timeout" from="Behaviour/Timer" to="Behaviour" method="OnTimeout"] diff --git a/scenes/entities/plants/cucumber.tscn b/scenes/entities/plants/cucumber.tscn index 6669e8f..3d8d930 100644 --- a/scenes/entities/plants/cucumber.tscn +++ b/scenes/entities/plants/cucumber.tscn @@ -1,21 +1,15 @@ -[gd_scene load_steps=25 format=3 uid="uid://cjoyh54cpjla7"] +[gd_scene load_steps=26 format=3 uid="uid://cjoyh54cpjla7"] -[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_65f4u"] +[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_xwpd6"] [ext_resource type="Texture2D" uid="uid://bt76iudw2qgnv" path="res://assets/sprites/atlases/plants/cumbucer.png" id="2_ig0op"] -[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_jbggv"] +[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_q31qc"] [ext_resource type="Script" uid="uid://dn53jvpjyg63l" path="res://scripts/entities/plants/Eyesight.cs" id="3_d45iq"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="3_q31qc"] [ext_resource type="Script" uid="uid://ceprqkraw3v6m" path="res://scripts/entities/plants/Shooter.cs" id="4_sckvu"] -[ext_resource type="PackedScene" uid="uid://c1ig40gtdcb60" path="res://scenes/projectiles/cucumber_projectile.tscn" id="5_sckvu"] +[ext_resource type="PackedScene" uid="uid://c1ig40gtdcb60" path="res://scenes/projectiles/cucumber_projectile_compound.tscn" id="5_sckvu"] [ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="6_xwpd6"] [ext_resource type="Script" uid="uid://bdk5iqtw4xbkl" path="res://scripts/entities/plants/behaviours/PeashooterBehaviour.cs" id="7_q31qc"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_jbggv"] -resource_local_to_scene = true -shader = ExtResource("2_jbggv") -shader_parameter/FLASH_COLOR = Color(0.78, 0.78, 0.78, 0.501961) -shader_parameter/HIGHLIGHT_COLOR = Color(0.69, 0, 0, 0.282353) -shader_parameter/selected = false -shader_parameter/blend = 0.0 +[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="9_a66ro"] [sub_resource type="Animation" id="Animation_n1xkd"] length = 0.001 @@ -118,7 +112,6 @@ transitions = ["Start", "cucumber_idle", SubResource("AnimationNodeStateMachineT graph_offset = Vector2(137, -3) [sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_xwpd6"] -graph_offset = Vector2(-370, 72) nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_ig0op") nodes/TimeScale/position = Vector2(60, 140) nodes/Tree/node = SubResource("AnimationNodeStateMachine_jbggv") @@ -132,54 +125,67 @@ height = 48.0 [sub_resource type="RectangleShape2D" id="RectangleShape2D_n1xkd"] size = Vector2(26, 600) -[node name="Cucumber" instance=ExtResource("1_65f4u")] -internal_id = "cucumber" +[node name="Cucumber" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] +material = ExtResource("2_q31qc") +script = ExtResource("1_xwpd6") MaxHP = 30.0 +_player = NodePath("AnimationPlayer") +_tree = NodePath("AnimationTree") -[node name="Sprite2D" parent="." index="0"] -material = SubResource("ShaderMaterial_jbggv") +[node name="Sprite2D" type="Sprite2D" parent="."] +material = ExtResource("2_q31qc") texture = ExtResource("2_ig0op") hframes = 10 vframes = 2 frame = 10 -[node name="AnimationPlayer" parent="." index="1"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { &"": SubResource("AnimationLibrary_gogcg"), &"cucumber": SubResource("AnimationLibrary_n1xkd") } -[node name="AnimationTree" parent="." index="2"] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] tree_root = SubResource("AnimationNodeBlendTree_xwpd6") +anim_player = NodePath("../AnimationPlayer") parameters/TimeScale/scale = 1.0 parameters/Tree/conditions/ready = false +script = ExtResource("3_q31qc") +entity = NodePath("..") -[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] shape = SubResource("CapsuleShape2D_ig0op") -[node name="Eysight" type="Area2D" parent="." index="4"] +[node name="Eysight" type="Area2D" parent="."] collision_layer = 4 collision_mask = 8 script = ExtResource("3_d45iq") -[node name="CollisionShape2D" type="CollisionShape2D" parent="Eysight" index="0"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="Eysight"] shape = SubResource("RectangleShape2D_n1xkd") -[node name="Shooter" type="Marker2D" parent="." index="5" node_paths=PackedStringArray("_timer")] +[node name="Shooter" type="Marker2D" parent="." node_paths=PackedStringArray("_timer")] script = ExtResource("4_sckvu") _projectile = ExtResource("5_sckvu") _timer = NodePath("FireTimer") -[node name="FireTimer" type="Timer" parent="Shooter" index="0" node_paths=PackedStringArray("entity")] +[node name="FireTimer" type="Timer" parent="Shooter" node_paths=PackedStringArray("entity")] wait_time = 2.5 one_shot = true script = ExtResource("6_xwpd6") entity = NodePath("../..") -[node name="Behaviour" type="Node" parent="." index="6" node_paths=PackedStringArray("_shootTimer", "_sight")] +[node name="Behaviour" type="Node" parent="." node_paths=PackedStringArray("_shootTimer", "_sight")] script = ExtResource("7_q31qc") _shootTimer = NodePath("../Shooter/FireTimer") _sight = NodePath("../Eysight") -[node name="FlashController" parent="." index="7"] -shaderMaterial = SubResource("ShaderMaterial_jbggv") +[node name="FlashController" type="Node" parent="."] +script = ExtResource("9_a66ro") +shaderMaterial = ExtResource("2_q31qc") + +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] diff --git a/scenes/entities/plants/garlic.tscn b/scenes/entities/plants/garlic.tscn index 16f671a..5ca32ca 100644 --- a/scenes/entities/plants/garlic.tscn +++ b/scenes/entities/plants/garlic.tscn @@ -1,11 +1,14 @@ -[gd_scene load_steps=16 format=3 uid="uid://qq0cw8xtcoj3"] +[gd_scene load_steps=19 format=3 uid="uid://qq0cw8xtcoj3"] -[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_5i0e6"] +[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_gu3kj"] +[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_1angc"] [ext_resource type="Texture2D" uid="uid://dff73m8ahamaa" path="res://assets/sprites/atlases/plants/garlic.png" id="2_w2jbi"] [ext_resource type="AnimationLibrary" uid="uid://cjl81f61gdlvi" path="res://assets/animations/plants/garlic.res" id="3_jkb3q"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="4_1angc"] [ext_resource type="Script" uid="uid://btkmd86pn828y" path="res://scripts/entities/plants/behaviours/HpBasedBehaviour.cs" id="4_bv44h"] [ext_resource type="Script" uid="uid://bmtukcq10m8wo" path="res://scripts/entities/plants/ReturnEffect.cs" id="5_oob20"] [ext_resource type="Resource" uid="uid://dsg1vjx76ifgu" path="res://assets/effects/GarlicEffect.tres" id="6_gho1l"] +[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="8_6iwlp"] [sub_resource type="Animation" id="Animation_k0cex"] length = 0.001 @@ -59,37 +62,52 @@ node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_thlvs"] size = Vector2(32, 29) -[node name="Garlic" instance=ExtResource("1_5i0e6")] -internal_id = "garlic" +[node name="Garlic" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] +script = ExtResource("1_gu3kj") MaxHP = 200.0 +_player = NodePath("AnimationPlayer") +_tree = NodePath("AnimationTree") -[node name="Sprite2D" parent="." index="0"] +[node name="Sprite2D" type="Sprite2D" parent="."] +material = ExtResource("2_1angc") texture = ExtResource("2_w2jbi") hframes = 8 vframes = 3 -[node name="AnimationPlayer" parent="." index="1"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { &"": SubResource("AnimationLibrary_v4l78"), &"garlic": ExtResource("3_jkb3q") } -[node name="AnimationTree" parent="." index="2"] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] tree_root = SubResource("AnimationNodeBlendTree_2o7sr") +anim_player = NodePath("../AnimationPlayer") parameters/TimeScale/scale = 1.0 parameters/Tree/blend_position = 1.0 +script = ExtResource("4_1angc") +entity = NodePath("..") -[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] position = Vector2(1, 11.5) shape = SubResource("RectangleShape2D_thlvs") -[node name="Behaviour" type="Node" parent="." index="4"] +[node name="Behaviour" type="Node" parent="."] script = ExtResource("4_bv44h") parameters = Array[String](["parameters/Tree/blend_position"]) -[node name="ReturnEffect" type="Node" parent="." index="5"] +[node name="ReturnEffect" type="Node" parent="."] script = ExtResource("5_oob20") _effectToReturn = ExtResource("6_gho1l") +[node name="FlashController" type="Node" parent="."] +script = ExtResource("8_6iwlp") +shaderMaterial = ExtResource("2_1angc") + +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] [connection signal="OnHPChanged" from="." to="Behaviour" method="OnHPChanged"] [connection signal="OnHPChanged" from="." to="ReturnEffect" method="OnDamageRecieved"] diff --git a/scenes/entities/plants/nerdus.tscn b/scenes/entities/plants/nerdus.tscn index 6ae9086..bb6393e 100644 --- a/scenes/entities/plants/nerdus.tscn +++ b/scenes/entities/plants/nerdus.tscn @@ -1,10 +1,13 @@ -[gd_scene load_steps=31 format=3 uid="uid://k5aj2slxar7w"] +[gd_scene load_steps=34 format=3 uid="uid://k5aj2slxar7w"] -[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_8ui1h"] +[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_o12iv"] +[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_6e60l"] [ext_resource type="Texture2D" uid="uid://b06e8xhdy77d1" path="res://assets/sprites/atlases/plants/nerdus.png" id="2_614v4"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="3_6e60l"] [ext_resource type="Script" uid="uid://dcokqes5wwo3k" path="res://scripts/entities/plants/NerdusReturnAttack.cs" id="3_614v4"] [ext_resource type="Resource" uid="uid://dme4nvp28otq6" path="res://assets/effects/NerdusEffect.tres" id="4_ga4vy"] [ext_resource type="Script" uid="uid://btkmd86pn828y" path="res://scripts/entities/plants/behaviours/HpBasedBehaviour.cs" id="5_o1ggp"] +[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="7_v7ffp"] [sub_resource type="Animation" id="Animation_ga4vy"] length = 0.001 @@ -251,46 +254,61 @@ radius = 24.0 [sub_resource type="RectangleShape2D" id="RectangleShape2D_ga4vy"] size = Vector2(73, 48) -[node name="Nerdus" instance=ExtResource("1_8ui1h")] -internal_id = "nerdus" +[node name="Nerdus" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] +script = ExtResource("1_o12iv") MaxHP = 200.0 +_player = NodePath("AnimationPlayer") +_tree = NodePath("AnimationTree") -[node name="Sprite2D" parent="." index="0"] +[node name="Sprite2D" type="Sprite2D" parent="."] +material = ExtResource("2_6e60l") texture = ExtResource("2_614v4") hframes = 7 vframes = 6 -[node name="AnimationPlayer" parent="." index="1"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { &"": SubResource("AnimationLibrary_o1ggp"), &"nerdus": SubResource("AnimationLibrary_pddnl") } -[node name="AnimationTree" parent="." index="2"] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] tree_root = SubResource("AnimationNodeBlendTree_6a4q1") advance_expression_base_node = NodePath("../Hurtbox") +anim_player = NodePath("../AnimationPlayer") parameters/TimeScale/scale = 1.0 parameters/Tree/Attack/blend_position = 1.0 parameters/Tree/Idle/blend_position = 1.0 +script = ExtResource("3_6e60l") +entity = NodePath("..") -[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] position = Vector2(0, 3) shape = SubResource("CircleShape2D_8ui1h") -[node name="Hurtbox" type="Area2D" parent="." index="4"] +[node name="Hurtbox" type="Area2D" parent="."] collision_layer = 0 collision_mask = 8 script = ExtResource("3_614v4") returnEffect = ExtResource("4_ga4vy") bitesToPeas = 1.6 -[node name="CollisionShape2D" type="CollisionShape2D" parent="Hurtbox" index="0"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hurtbox"] position = Vector2(3.5, 3) shape = SubResource("RectangleShape2D_ga4vy") -[node name="Behaviour" type="Node" parent="." index="5"] +[node name="Behaviour" type="Node" parent="."] script = ExtResource("5_o1ggp") parameters = Array[String](["parameters/Tree/Attack/blend_position", "parameters/Tree/Idle/blend_position"]) +[node name="FlashController" type="Node" parent="."] +script = ExtResource("7_v7ffp") +shaderMaterial = ExtResource("2_6e60l") + +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] [connection signal="OnHPChanged" from="." to="Hurtbox" method="OnHPChanged"] [connection signal="OnHPChanged" from="." to="Behaviour" method="OnHPChanged"] diff --git a/scenes/entities/plants/peashooter.tscn b/scenes/entities/plants/peashooter.tscn index 841fd67..11ed7f7 100644 --- a/scenes/entities/plants/peashooter.tscn +++ b/scenes/entities/plants/peashooter.tscn @@ -1,25 +1,19 @@ -[gd_scene load_steps=26 format=3 uid="uid://dy41q1kxray5t"] +[gd_scene load_steps=27 format=3 uid="uid://dy41q1kxray5t"] -[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_pyk3o"] +[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_p4cd5"] [ext_resource type="Texture2D" uid="uid://cksryh4w5dbbx" path="res://assets/sprites/atlases/plants/peashooter.png" id="2_14qlx"] -[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_fp65y"] +[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_p4cd5"] [ext_resource type="AnimationLibrary" uid="uid://bv1dl1g4dmbho" path="res://assets/animations/plants/peashooter.res" id="3_8lrhp"] [ext_resource type="Script" uid="uid://ceprqkraw3v6m" path="res://scripts/entities/plants/Shooter.cs" id="3_a4ew1"] [ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/projectiles/pea.tscn" id="4_saxds"] [ext_resource type="Script" uid="uid://bdk5iqtw4xbkl" path="res://scripts/entities/plants/behaviours/PeashooterBehaviour.cs" id="5_7qiua"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="5_ceium"] [ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="6_q58jr"] [ext_resource type="Script" uid="uid://dn53jvpjyg63l" path="res://scripts/entities/plants/Eyesight.cs" id="7_2bki8"] [ext_resource type="Script" uid="uid://hccb0aee0x0o" path="res://scripts/entities/plants/PlantEyesightLimiter.cs" id="8_nl4jc"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="9_mbbd7"] [ext_resource type="AudioStream" uid="uid://dsv81mvrdg3w3" path="res://assets/audio/sfx/throw_generic.tres" id="10_q58jr"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_fp65y"] -resource_local_to_scene = true -shader = ExtResource("2_fp65y") -shader_parameter/FLASH_COLOR = Color(0.78, 0.78, 0.78, 0.501961) -shader_parameter/HIGHLIGHT_COLOR = Color(0.69, 0, 0, 0.282353) -shader_parameter/selected = false -shader_parameter/blend = 0.0 +[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="14_dmys5"] [sub_resource type="Animation" id="Animation_a2y0j"] length = 0.001 @@ -81,63 +75,75 @@ resource_local_to_scene = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_r7xnh"] size = Vector2(20, 44) -[node name="Peashooter" instance=ExtResource("1_pyk3o")] -internal_id = "peashooter" +[node name="Peashooter" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] +script = ExtResource("1_p4cd5") MaxHP = 30.0 +_player = NodePath("AnimationPlayer") +_tree = NodePath("AnimationTree") -[node name="Sprite2D" parent="." index="0"] -material = SubResource("ShaderMaterial_fp65y") +[node name="Sprite2D" type="Sprite2D" parent="."] +material = ExtResource("2_p4cd5") texture = ExtResource("2_14qlx") hframes = 10 vframes = 2 -[node name="AnimationPlayer" parent="." index="1"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { &"": SubResource("AnimationLibrary_ipp6b"), &"peashooter": ExtResource("3_8lrhp") } autoplay = "peashooter/idle" -[node name="AnimationTree" parent="." index="2"] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] tree_root = SubResource("AnimationNodeBlendTree_q58jr") +anim_player = NodePath("../AnimationPlayer") parameters/TimeScale/scale = 1.0 parameters/Tree/conditions/ready = false +script = ExtResource("5_ceium") +entity = NodePath("..") -[node name="Shooter" type="Marker2D" parent="." index="3" node_paths=PackedStringArray("_timer")] +[node name="Shooter" type="Marker2D" parent="." node_paths=PackedStringArray("_timer")] position = Vector2(12, -4) script = ExtResource("3_a4ew1") _projectile = ExtResource("4_saxds") _timer = NodePath("FireTimer") -[node name="FireTimer" type="Timer" parent="Shooter" index="0" node_paths=PackedStringArray("entity")] +[node name="FireTimer" type="Timer" parent="Shooter" node_paths=PackedStringArray("entity")] wait_time = 1.5 one_shot = true script = ExtResource("6_q58jr") entity = NodePath("../..") -[node name="Behaviour" type="Node" parent="." index="4" node_paths=PackedStringArray("_shootTimer", "_sight")] +[node name="Behaviour" type="Node" parent="." node_paths=PackedStringArray("_shootTimer", "_sight")] script = ExtResource("5_7qiua") _shootTimer = NodePath("../Shooter/FireTimer") _sight = NodePath("../Eysight") -[node name="Eysight" type="Area2D" parent="." index="5"] +[node name="Eysight" type="Area2D" parent="."] collision_layer = 4 collision_mask = 8 script = ExtResource("7_2bki8") -[node name="CollisionShape2D" type="CollisionShape2D" parent="Eysight" index="0"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="Eysight"] shape = SubResource("SegmentShape2D_8iovl") script = ExtResource("8_nl4jc") -[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] position = Vector2(0, 5) shape = SubResource("RectangleShape2D_r7xnh") -[node name="ChannelPlayer" type="Node" parent="." index="7"] +[node name="ChannelPlayer" type="Node" parent="."] script = ExtResource("9_mbbd7") audioStream = ExtResource("10_q58jr") channel = "pea_shoot" metadata/_custom_type_script = "uid://c36bj8u7jghc7" -[node name="FlashController" parent="." index="8"] -shaderMaterial = SubResource("ShaderMaterial_fp65y") +[node name="FlashController" type="Node" parent="."] +script = ExtResource("14_dmys5") +shaderMaterial = ExtResource("2_p4cd5") + +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] diff --git a/scenes/entities/plants/potato_mine.tscn b/scenes/entities/plants/potato_mine.tscn index a444609..6c08e76 100644 --- a/scenes/entities/plants/potato_mine.tscn +++ b/scenes/entities/plants/potato_mine.tscn @@ -1,24 +1,18 @@ -[gd_scene load_steps=29 format=3 uid="uid://b5x35v3w2u8dx"] +[gd_scene load_steps=30 format=3 uid="uid://b5x35v3w2u8dx"] -[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_dj7ul"] -[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_lx7n5"] +[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_a0d1l"] +[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_a0d1l"] [ext_resource type="Texture2D" uid="uid://c77o6ba0mw7a3" path="res://assets/sprites/atlases/plants/potato_mine.png" id="2_sneas"] [ext_resource type="Script" uid="uid://bhl6o2m3fn4xg" path="res://scripts/entities/plants/ExplosionComponent.cs" id="3_2hd5y"] [ext_resource type="AnimationLibrary" uid="uid://bjlbdvr6f0r7e" path="res://assets/animations/plants/potato_mine.res" id="3_7tqmj"] [ext_resource type="Script" uid="uid://c7qfh4py0uulo" path="res://scripts/entities/plants/behaviours/PotatomineBehaviour.cs" id="4_twx65"] [ext_resource type="PackedScene" uid="uid://ckanq33rao1ur" path="res://scenes/particles/potato_explosion.tscn" id="5_px4r0"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="5_v27q1"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="7_b1j2f"] [ext_resource type="AudioStream" uid="uid://dltjtpyfr1so0" path="res://assets/audio/sfx/potato_mine.mp3" id="8_3vqdc"] [ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="8_824aq"] [ext_resource type="AudioStream" uid="uid://b27om1bw1x04e" path="res://assets/audio/sfx/dirt_rise.mp3" id="9_3vqdc"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_crloj"] -resource_local_to_scene = true -shader = ExtResource("2_lx7n5") -shader_parameter/FLASH_COLOR = Color(0.78, 0.78, 0.78, 0.501961) -shader_parameter/HIGHLIGHT_COLOR = Color(0.69, 0, 0, 0.282353) -shader_parameter/selected = false -shader_parameter/blend = 0.0 +[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="13_cfvur"] [sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_3vqdc"] @@ -86,85 +80,96 @@ size = Vector2(15, 27) [sub_resource type="RectangleShape2D" id="RectangleShape2D_ti2g4"] size = Vector2(22, 19) -[node name="Potato mine" instance=ExtResource("1_dj7ul")] -internal_id = "potatomine" +[node name="Potato mine" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] +script = ExtResource("1_a0d1l") MaxHP = 20.0 +_player = NodePath("AnimationPlayer") +_tree = NodePath("AnimationTree") -[node name="Sprite2D" parent="." index="0"] -material = SubResource("ShaderMaterial_crloj") +[node name="Sprite2D" type="Sprite2D" parent="."] +material = ExtResource("2_a0d1l") texture = ExtResource("2_sneas") hframes = 7 vframes = 4 frame = 7 -[node name="AnimationPlayer" parent="." index="1"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { &"potato_mine": ExtResource("3_7tqmj") } autoplay = "idle_unprimed" -[node name="AnimationTree" parent="." index="2"] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] tree_root = SubResource("AnimationNodeBlendTree_824aq") +anim_player = NodePath("../AnimationPlayer") parameters/TimeScale/scale = 1.0 parameters/Tree/conditions/explode = false parameters/Tree/conditions/primed = false +script = ExtResource("5_v27q1") +entity = NodePath("..") -[node name="Detectionbox" type="Area2D" parent="." index="3"] +[node name="Detectionbox" type="Area2D" parent="."] collision_layer = 0 collision_mask = 8 -[node name="CollisionShape2D" type="CollisionShape2D" parent="Detectionbox" index="0"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="Detectionbox"] position = Vector2(0, 9) shape = SubResource("CircleShape2D_824aq") -[node name="ExplosionBox" type="Area2D" parent="." index="4"] +[node name="ExplosionBox" type="Area2D" parent="."] collision_layer = 0 collision_mask = 8 script = ExtResource("3_2hd5y") damage = 6000 particles = ExtResource("5_px4r0") -[node name="CollisionShape2D" type="CollisionShape2D" parent="ExplosionBox" index="0"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="ExplosionBox"] position = Vector2(0, 9) shape = SubResource("CircleShape2D_wvns6") -[node name="ExplosionPlayer" type="Node" parent="ExplosionBox" index="1"] +[node name="ExplosionPlayer" type="Node" parent="ExplosionBox"] script = ExtResource("7_b1j2f") audioStream = ExtResource("8_3vqdc") channel = "explosion" metadata/_custom_type_script = "uid://c36bj8u7jghc7" -[node name="PrimeTimer" type="Timer" parent="." index="5" node_paths=PackedStringArray("entity")] +[node name="PrimeTimer" type="Timer" parent="." node_paths=PackedStringArray("entity")] wait_time = 15.0 one_shot = true autostart = true script = ExtResource("8_824aq") entity = NodePath("..") -[node name="Behaviour" type="Node" parent="." index="6" node_paths=PackedStringArray("_hitbox", "detectionBox", "_unprimedShape", "_primedShape")] +[node name="Behaviour" type="Node" parent="." node_paths=PackedStringArray("_hitbox", "detectionBox", "_unprimedShape", "_primedShape")] script = ExtResource("4_twx65") _hitbox = NodePath("../Hitbox") detectionBox = NodePath("../Detectionbox") _unprimedShape = NodePath("../Hitbox/Unprimed") _primedShape = NodePath("../Hitbox/Primed") -[node name="Unprimed" type="CollisionShape2D" parent="Hitbox" index="0"] +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 2 +collision_mask = 0 + +[node name="Unprimed" type="CollisionShape2D" parent="Hitbox"] position = Vector2(-0.5, 14.5) shape = SubResource("RectangleShape2D_qfqko") -[node name="Primed" type="CollisionShape2D" parent="Hitbox" index="1"] +[node name="Primed" type="CollisionShape2D" parent="Hitbox"] position = Vector2(0, 16.5) shape = SubResource("RectangleShape2D_ti2g4") disabled = true -[node name="ChannelPlayer" type="Node" parent="." index="8"] +[node name="ChannelPlayer" type="Node" parent="."] script = ExtResource("7_b1j2f") audioStream = ExtResource("9_3vqdc") channel = "plant_rise" metadata/_custom_type_script = "uid://c36bj8u7jghc7" -[node name="FlashController" parent="." index="9"] -shaderMaterial = SubResource("ShaderMaterial_crloj") +[node name="FlashController" type="Node" parent="."] +script = ExtResource("13_cfvur") +shaderMaterial = ExtResource("2_a0d1l") +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] [connection signal="area_entered" from="Detectionbox" to="Behaviour" method="OnAreaEntered"] [connection signal="timeout" from="PrimeTimer" to="Behaviour" method="Prime"] diff --git a/scenes/entities/plants/repeater.tscn b/scenes/entities/plants/repeater.tscn new file mode 100644 index 0000000..7a5fba9 --- /dev/null +++ b/scenes/entities/plants/repeater.tscn @@ -0,0 +1,149 @@ +[gd_scene load_steps=27 format=3 uid="uid://bb4ya5qx224ca"] + +[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_22an6"] +[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_tut6f"] +[ext_resource type="Texture2D" uid="uid://cksryh4w5dbbx" path="res://assets/sprites/atlases/plants/peashooter.png" id="3_8aoci"] +[ext_resource type="AnimationLibrary" uid="uid://bv1dl1g4dmbho" path="res://assets/animations/plants/peashooter.res" id="4_rdf0i"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="5_dwhke"] +[ext_resource type="Script" uid="uid://ceprqkraw3v6m" path="res://scripts/entities/plants/Shooter.cs" id="6_f5jji"] +[ext_resource type="PackedScene" uid="uid://b45wmmcie6yeg" path="res://scenes/projectiles/repeater_projectile.tscn" id="7_22an6"] +[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="8_w0eom"] +[ext_resource type="Script" uid="uid://bdk5iqtw4xbkl" path="res://scripts/entities/plants/behaviours/PeashooterBehaviour.cs" id="9_cqtdb"] +[ext_resource type="Script" uid="uid://dn53jvpjyg63l" path="res://scripts/entities/plants/Eyesight.cs" id="10_bi2sw"] +[ext_resource type="Script" uid="uid://hccb0aee0x0o" path="res://scripts/entities/plants/PlantEyesightLimiter.cs" id="11_4nqum"] +[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="12_7n1bh"] +[ext_resource type="AudioStream" uid="uid://dsv81mvrdg3w3" path="res://assets/audio/sfx/throw_generic.tres" id="13_hxb23"] +[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="14_aq7hn"] + +[sub_resource type="Animation" id="Animation_a2y0j"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_ipp6b"] +_data = { +&"RESET": SubResource("Animation_a2y0j") +} + +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_mbbd7"] + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_34v85"] +animation = &"peashooter/idle" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_u4o2k"] +animation = &"peashooter/shoot" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_70n3m"] +advance_mode = 2 + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_2lwpg"] +advance_mode = 2 +advance_condition = &"ready" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_k61yr"] +switch_mode = 2 +advance_mode = 2 + +[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_13o7y"] +states/peashooter_idle/node = SubResource("AnimationNodeAnimation_34v85") +states/peashooter_idle/position = Vector2(420, 92) +states/peashooter_shoot/node = SubResource("AnimationNodeAnimation_u4o2k") +states/peashooter_shoot/position = Vector2(674, 82) +transitions = ["Start", "peashooter_idle", SubResource("AnimationNodeStateMachineTransition_70n3m"), "peashooter_idle", "peashooter_shoot", SubResource("AnimationNodeStateMachineTransition_2lwpg"), "peashooter_shoot", "peashooter_idle", SubResource("AnimationNodeStateMachineTransition_k61yr")] + +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_q58jr"] +graph_offset = Vector2(-518.8, 27.8) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_mbbd7") +nodes/TimeScale/position = Vector2(0, 120) +nodes/Tree/node = SubResource("AnimationNodeStateMachine_13o7y") +nodes/Tree/position = Vector2(-300, 120) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + +[sub_resource type="SegmentShape2D" id="SegmentShape2D_8iovl"] +resource_local_to_scene = true + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_r7xnh"] +size = Vector2(20, 44) + +[node name="Repeater" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] +script = ExtResource("1_22an6") +MaxHP = 30.0 +_player = NodePath("AnimationPlayer") +_tree = NodePath("AnimationTree") + +[node name="Sprite2D" type="Sprite2D" parent="."] +material = ExtResource("2_tut6f") +texture = ExtResource("3_8aoci") +hframes = 10 +vframes = 2 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +&"": SubResource("AnimationLibrary_ipp6b"), +&"peashooter": ExtResource("4_rdf0i") +} +autoplay = "peashooter/idle" + +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] +tree_root = SubResource("AnimationNodeBlendTree_q58jr") +anim_player = NodePath("../AnimationPlayer") +parameters/TimeScale/scale = 1.0 +parameters/Tree/conditions/ready = false +script = ExtResource("5_dwhke") +entity = NodePath("..") + +[node name="Shooter" type="Marker2D" parent="." node_paths=PackedStringArray("_timer")] +position = Vector2(12, -4) +script = ExtResource("6_f5jji") +_projectile = ExtResource("7_22an6") +_timer = NodePath("FireTimer") + +[node name="FireTimer" type="Timer" parent="Shooter" node_paths=PackedStringArray("entity")] +wait_time = 1.5 +one_shot = true +script = ExtResource("8_w0eom") +entity = NodePath("../..") + +[node name="Behaviour" type="Node" parent="." node_paths=PackedStringArray("_shootTimer", "_sight")] +script = ExtResource("9_cqtdb") +_shootTimer = NodePath("../Shooter/FireTimer") +_sight = NodePath("../Eysight") + +[node name="Eysight" type="Area2D" parent="."] +collision_layer = 4 +collision_mask = 8 +script = ExtResource("10_bi2sw") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Eysight"] +shape = SubResource("SegmentShape2D_8iovl") +script = ExtResource("11_4nqum") + +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] +position = Vector2(0, 5) +shape = SubResource("RectangleShape2D_r7xnh") + +[node name="ChannelPlayer" type="Node" parent="."] +script = ExtResource("12_7n1bh") +audioStream = ExtResource("13_hxb23") +channel = "pea_shoot" +metadata/_custom_type_script = "uid://c36bj8u7jghc7" + +[node name="FlashController" type="Node" parent="."] +script = ExtResource("14_aq7hn") +shaderMaterial = ExtResource("2_tut6f") + +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] diff --git a/scenes/entities/plants/snipach.tscn b/scenes/entities/plants/snipach.tscn index 1156733..f3387cd 100644 --- a/scenes/entities/plants/snipach.tscn +++ b/scenes/entities/plants/snipach.tscn @@ -1,21 +1,15 @@ -[gd_scene load_steps=13 format=3 uid="uid://bmk41n57j7hgx"] +[gd_scene load_steps=14 format=3 uid="uid://bmk41n57j7hgx"] -[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_ltcu2"] -[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_ktw4a"] +[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_moq7q"] +[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_moq7q"] [ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="3_ktw4a"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="4_4ermv"] [ext_resource type="Script" uid="uid://cu63aiowp5bqd" path="res://scripts/entities/plants/DragAction.cs" id="4_5jowj"] [ext_resource type="Script" uid="uid://co7ttejdo2qot" path="res://scripts/entities/plants/AreaAttack.cs" id="5_twsk4"] +[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="6_4uf0y"] [ext_resource type="Script" uid="uid://csgksiyma0h4t" path="res://scripts/entities/plants/behaviours/SnipachBehaviour.cs" id="6_twsk4"] [ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="7_3hyni"] -[sub_resource type="ShaderMaterial" id="ShaderMaterial_f4wwx"] -resource_local_to_scene = true -shader = ExtResource("2_ktw4a") -shader_parameter/FLASH_COLOR = Color(0.78, 0.78, 0.78, 0.501961) -shader_parameter/HIGHLIGHT_COLOR = Color(0.69, 0, 0, 0.282353) -shader_parameter/selected = false -shader_parameter/blend = 0.0 - [sub_resource type="AtlasTexture" id="AtlasTexture_f4wwx"] atlas = ExtResource("3_ktw4a") region = Rect2(525, 241, 79, 72) @@ -30,26 +24,40 @@ region = Rect2(592, 64, 50, 60) [sub_resource type="RectangleShape2D" id="RectangleShape2D_5jowj"] size = Vector2(40, 36) -[node name="Snipach" instance=ExtResource("1_ltcu2")] -internal_id = "snipach" +[node name="Snipach" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] +script = ExtResource("1_moq7q") MaxHP = 30.0 +_player = NodePath("AnimationPlayer") +_tree = NodePath("AnimationTree") -[node name="Sprite2D" parent="." index="0"] -material = SubResource("ShaderMaterial_f4wwx") +[node name="Sprite2D" type="Sprite2D" parent="."] +material = ExtResource("2_moq7q") position = Vector2(8, -16) texture = SubResource("AtlasTexture_f4wwx") -[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] + +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] +anim_player = NodePath("../AnimationPlayer") +script = ExtResource("4_4ermv") +entity = NodePath("..") + +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] position = Vector2(-0.75, -2.5) shape = SubResource("RectangleShape2D_ktw4a") -[node name="DragAction" type="Node" parent="Hitbox" index="1"] +[node name="DragAction" type="Node" parent="Hitbox"] script = ExtResource("4_5jowj") -[node name="FlashController" parent="." index="4"] -shaderMaterial = SubResource("ShaderMaterial_f4wwx") +[node name="FlashController" type="Node" parent="."] +script = ExtResource("6_4uf0y") +shaderMaterial = ExtResource("2_moq7q") -[node name="ShootBox" type="Area2D" parent="." index="5"] +[node name="ShootBox" type="Area2D" parent="."] visible = false collision_layer = 32 collision_mask = 24 @@ -57,29 +65,30 @@ input_pickable = false script = ExtResource("5_twsk4") _damage = 400 -[node name="Sprite2D" type="Sprite2D" parent="ShootBox" index="0"] +[node name="Sprite2D" type="Sprite2D" parent="ShootBox"] texture = SubResource("AtlasTexture_3hyni") -[node name="CollisionShape2D" type="CollisionShape2D" parent="ShootBox" index="1"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="ShootBox"] shape = SubResource("RectangleShape2D_5jowj") -[node name="Behaviour" type="Node" parent="." index="6" node_paths=PackedStringArray("attackBox", "timer", "guardTimer")] +[node name="Behaviour" type="Node" parent="." node_paths=PackedStringArray("attackBox", "timer", "guardTimer")] script = ExtResource("6_twsk4") attackBox = NodePath("../ShootBox") timer = NodePath("Timer") guardTimer = NodePath("GuardTimer") -[node name="Timer" type="Timer" parent="Behaviour" index="0" node_paths=PackedStringArray("entity")] +[node name="Timer" type="Timer" parent="Behaviour" node_paths=PackedStringArray("entity")] wait_time = 15.0 one_shot = true script = ExtResource("7_3hyni") entity = NodePath("../..") -[node name="GuardTimer" type="Timer" parent="Behaviour" index="1"] +[node name="GuardTimer" type="Timer" parent="Behaviour"] wait_time = 0.2 one_shot = true autostart = true ignore_time_scale = true +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] [connection signal="DragBegin" from="Hitbox/DragAction" to="Behaviour" method="OnDragBegin"] [connection signal="DragEnd" from="Hitbox/DragAction" to="Behaviour" method="OnDragEnd"] diff --git a/scenes/entities/plants/snowpea.tscn b/scenes/entities/plants/snowpea.tscn index a3031e6..45fc12f 100644 --- a/scenes/entities/plants/snowpea.tscn +++ b/scenes/entities/plants/snowpea.tscn @@ -1,18 +1,19 @@ -[gd_scene load_steps=18 format=3 uid="uid://b7innrovtmf5u"] +[gd_scene load_steps=27 format=3 uid="uid://b7innrovtmf5u"] -[ext_resource type="PackedScene" uid="uid://dy41q1kxray5t" path="res://scenes/entities/plants/peashooter.tscn" id="1_lp85e"] +[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_klsgb"] +[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_klsgb"] [ext_resource type="Texture2D" uid="uid://cu0651pvvkmvm" path="res://assets/sprites/atlases/plants/snow_pea.png" id="2_ytrm0"] -[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_yyg2a"] [ext_resource type="AnimationLibrary" uid="uid://cke5wmmrvevbs" path="res://assets/animations/plants/snowpea.res" id="4_jvx5y"] [ext_resource type="PackedScene" uid="uid://domeukw4ucmyr" path="res://scenes/projectiles/snowpea_projectile.tscn" id="5_bv86m"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_g872w"] -resource_local_to_scene = true -shader = ExtResource("2_yyg2a") -shader_parameter/FLASH_COLOR = Color(0.78, 0.78, 0.78, 0.501961) -shader_parameter/HIGHLIGHT_COLOR = Color(0.69, 0, 0, 0.282353) -shader_parameter/selected = false -shader_parameter/blend = 0.0 +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="5_fbp2l"] +[ext_resource type="Script" uid="uid://ceprqkraw3v6m" path="res://scripts/entities/plants/Shooter.cs" id="6_br16s"] +[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="8_bjd0y"] +[ext_resource type="Script" uid="uid://bdk5iqtw4xbkl" path="res://scripts/entities/plants/behaviours/PeashooterBehaviour.cs" id="9_hg126"] +[ext_resource type="Script" uid="uid://dn53jvpjyg63l" path="res://scripts/entities/plants/Eyesight.cs" id="10_noqdw"] +[ext_resource type="Script" uid="uid://hccb0aee0x0o" path="res://scripts/entities/plants/PlantEyesightLimiter.cs" id="11_terbf"] +[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="12_dvoqf"] +[ext_resource type="AudioStream" uid="uid://dsv81mvrdg3w3" path="res://assets/audio/sfx/throw_generic.tres" id="13_o05jr"] +[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="14_oijop"] [sub_resource type="Animation" id="Animation_pephc"] length = 0.001 @@ -71,28 +72,78 @@ node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] [sub_resource type="SegmentShape2D" id="SegmentShape2D_3oyhk"] resource_local_to_scene = true -[node name="Snowpea" instance=ExtResource("1_lp85e")] -internal_id = "snowpea" +[sub_resource type="RectangleShape2D" id="RectangleShape2D_r7xnh"] +size = Vector2(20, 44) -[node name="Sprite2D" parent="." index="0"] -material = SubResource("ShaderMaterial_g872w") +[node name="Snowpea" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] +script = ExtResource("1_klsgb") +MaxHP = 30.0 +_player = NodePath("AnimationPlayer") +_tree = NodePath("AnimationTree") + +[node name="Sprite2D" type="Sprite2D" parent="."] +material = ExtResource("2_klsgb") texture = ExtResource("2_ytrm0") +hframes = 10 +vframes = 2 -[node name="AnimationPlayer" parent="." index="1"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { &"": SubResource("AnimationLibrary_djmlc"), &"snowpea": ExtResource("4_jvx5y") } autoplay = "snowpea/idle" -[node name="AnimationTree" parent="." index="2"] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] tree_root = SubResource("AnimationNodeBlendTree_3oyhk") +anim_player = NodePath("../AnimationPlayer") +parameters/TimeScale/scale = 1.0 +parameters/Tree/conditions/ready = false +script = ExtResource("5_fbp2l") +entity = NodePath("..") -[node name="Shooter" parent="." index="3"] +[node name="Shooter" type="Marker2D" parent="." node_paths=PackedStringArray("_timer")] +position = Vector2(12, -4) +script = ExtResource("6_br16s") _projectile = ExtResource("5_bv86m") +_timer = NodePath("FireTimer") -[node name="CollisionShape2D" parent="Eysight" index="0"] +[node name="FireTimer" type="Timer" parent="Shooter" node_paths=PackedStringArray("entity")] +wait_time = 1.5 +one_shot = true +script = ExtResource("8_bjd0y") +entity = NodePath("../..") + +[node name="Behaviour" type="Node" parent="." node_paths=PackedStringArray("_shootTimer", "_sight")] +script = ExtResource("9_hg126") +_shootTimer = NodePath("../Shooter/FireTimer") +_sight = NodePath("../Eysight") + +[node name="Eysight" type="Area2D" parent="."] +collision_layer = 4 +collision_mask = 8 +script = ExtResource("10_noqdw") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Eysight"] shape = SubResource("SegmentShape2D_3oyhk") +script = ExtResource("11_terbf") -[node name="FlashController" parent="." index="8"] -shaderMaterial = SubResource("ShaderMaterial_g872w") +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] +position = Vector2(0, 5) +shape = SubResource("RectangleShape2D_r7xnh") + +[node name="ChannelPlayer" type="Node" parent="."] +script = ExtResource("12_dvoqf") +audioStream = ExtResource("13_o05jr") +channel = "pea_shoot" +metadata/_custom_type_script = "uid://c36bj8u7jghc7" + +[node name="FlashController" type="Node" parent="."] +script = ExtResource("14_oijop") +shaderMaterial = ExtResource("2_klsgb") + +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] diff --git a/scenes/entities/plants/spikeweed.tscn b/scenes/entities/plants/spikeweed.tscn index b76c66a..b98941b 100644 --- a/scenes/entities/plants/spikeweed.tscn +++ b/scenes/entities/plants/spikeweed.tscn @@ -1,20 +1,14 @@ -[gd_scene load_steps=15 format=3 uid="uid://bdhod5c6o53ha"] +[gd_scene load_steps=16 format=3 uid="uid://bdhod5c6o53ha"] -[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_vmbvr"] -[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_63okc"] +[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_kd62n"] [ext_resource type="Texture2D" uid="uid://coafh3mjharxo" path="res://assets/sprites/atlases/plants/spikeweed.png" id="2_ffrjr"] +[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_kd62n"] [ext_resource type="Script" uid="uid://co7ttejdo2qot" path="res://scripts/entities/plants/AreaAttack.cs" id="3_hqtbm"] [ext_resource type="AnimationLibrary" uid="uid://cen6ku4y01dyg" path="res://assets/animations/plants/spikeweed.res" id="3_nwshn"] [ext_resource type="Script" uid="uid://dqquodxaijmem" path="res://scripts/entities/plants/behaviours/SpikeweedBehaviour.cs" id="3_uhpn7"] [ext_resource type="Script" uid="uid://dw7v3s4kbu7ma" path="res://scripts/entities/AnimationStatistics.cs" id="5_yfuxj"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_yfuxj"] -resource_local_to_scene = true -shader = ExtResource("2_63okc") -shader_parameter/FLASH_COLOR = Color(0.78, 0.78, 0.78, 0.501961) -shader_parameter/HIGHLIGHT_COLOR = Color(0.69, 0, 0, 0.282353) -shader_parameter/selected = false -shader_parameter/blend = 0.0 +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="6_sqcsr"] +[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="9_lq7xg"] [sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_jleqa"] @@ -45,47 +39,54 @@ node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_1di76"] size = Vector2(49, 38) -[node name="Spikeweed" instance=ExtResource("1_vmbvr")] -internal_id = "spikeweed" +[node name="Spikeweed" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] +script = ExtResource("1_kd62n") MaxHP = 30.0 +_player = NodePath("AnimationPlayer") +_tree = NodePath("AnimationTree") -[node name="Sprite2D" parent="." index="0"] -material = SubResource("ShaderMaterial_yfuxj") +[node name="Sprite2D" type="Sprite2D" parent="."] +material = ExtResource("2_kd62n") texture = ExtResource("2_ffrjr") hframes = 10 vframes = 2 -frame = 6 +frame = 1 -[node name="AnimationPlayer" parent="." index="1"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { &"spikeweed": ExtResource("3_nwshn") } -[node name="DPSStatistics" type="Node" parent="AnimationPlayer" index="0"] +[node name="DPSStatistics" type="Node" parent="AnimationPlayer"] script = ExtResource("5_yfuxj") animationName = "spikeweed/attack" trackToFind = "Hitbox" -[node name="AnimationTree" parent="." index="2"] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] tree_root = SubResource("AnimationNodeBlendTree_63okc") +anim_player = NodePath("../AnimationPlayer") parameters/TimeScale/scale = 1.0 parameters/Tree/blend_position = 0 +script = ExtResource("6_sqcsr") +entity = NodePath("..") -[node name="Behaviour" type="Node" parent="." index="3"] +[node name="Behaviour" type="Node" parent="."] script = ExtResource("3_uhpn7") -[node name="Hitbox" parent="." index="4"] +[node name="Hitbox" type="Area2D" parent="."] collision_layer = 4 collision_mask = 8 script = ExtResource("3_hqtbm") _damage = 6 -[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] position = Vector2(0.5, 9) shape = SubResource("RectangleShape2D_1di76") -[node name="FlashController" parent="." index="5"] -shaderMaterial = SubResource("ShaderMaterial_yfuxj") +[node name="FlashController" type="Node" parent="."] +script = ExtResource("9_lq7xg") +shaderMaterial = ExtResource("2_kd62n") +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] [connection signal="area_entered" from="Hitbox" to="Behaviour" method="OnHitboxEntered"] [connection signal="area_exited" from="Hitbox" to="Behaviour" method="OnHitboxExited"] diff --git a/scenes/entities/plants/sunflower.tscn b/scenes/entities/plants/sunflower.tscn index 3fba194..3d6d1b8 100644 --- a/scenes/entities/plants/sunflower.tscn +++ b/scenes/entities/plants/sunflower.tscn @@ -1,21 +1,15 @@ -[gd_scene load_steps=21 format=3 uid="uid://bg7lomiorxo2c"] +[gd_scene load_steps=22 format=3 uid="uid://bg7lomiorxo2c"] -[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_bikjn"] +[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_yyn2e"] [ext_resource type="Texture2D" uid="uid://b3tuidu8dag8u" path="res://assets/sprites/atlases/plants/sunflower.png" id="2_fwcda"] -[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_qpvbo"] +[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_yyn2e"] [ext_resource type="AnimationLibrary" uid="uid://yjytiuj4u7oh" path="res://assets/animations/plants/sunflower.res" id="3_btsik"] [ext_resource type="Script" uid="uid://b71gebny84s81" path="res://scripts/entities/plants/PlantSunSpawner.cs" id="3_te0pl"] [ext_resource type="PackedScene" uid="uid://bpekho7leatr5" path="res://scenes/sun.tscn" id="4_b8hls"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="5_7omaw"] [ext_resource type="Script" uid="uid://bth7gah4tn7uj" path="res://scripts/entities/plants/behaviours/SunflowerBehaviour.cs" id="5_26je0"] [ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="7_rlkb7"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_mdjfv"] -resource_local_to_scene = true -shader = ExtResource("2_qpvbo") -shader_parameter/FLASH_COLOR = Color(0.78, 0.78, 0.78, 0.501961) -shader_parameter/HIGHLIGHT_COLOR = Color(0.69, 0, 0, 0.282353) -shader_parameter/selected = false -shader_parameter/blend = 0.0 +[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="10_w3e3c"] [sub_resource type="Animation" id="Animation_bfx6v"] length = 0.001 @@ -73,56 +67,67 @@ node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_4xs4g"] size = Vector2(26, 48) -[node name="Sunflower" instance=ExtResource("1_bikjn")] -internal_id = "sunflower" +[node name="Sunflower" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] +script = ExtResource("1_yyn2e") MaxHP = 30.0 +_player = NodePath("AnimationPlayer") +_tree = NodePath("AnimationTree") -[node name="Sprite2D" parent="." index="0"] -material = SubResource("ShaderMaterial_mdjfv") +[node name="Sprite2D" type="Sprite2D" parent="."] +material = ExtResource("2_yyn2e") texture = ExtResource("2_fwcda") hframes = 9 vframes = 2 -frame = 2 +frame = 4 -[node name="AnimationPlayer" parent="." index="1"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { &"": SubResource("AnimationLibrary_ek2al"), &"sunflower": ExtResource("3_btsik") } -[node name="AnimationTree" parent="." index="2"] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] tree_root = SubResource("AnimationNodeBlendTree_rlkb7") +anim_player = NodePath("../AnimationPlayer") parameters/TimeScale/scale = 1.0 parameters/Tree/conditions/produce = false +script = ExtResource("5_7omaw") +entity = NodePath("..") -[node name="PlantSunSpawner" type="Node2D" parent="." index="3"] +[node name="PlantSunSpawner" type="Node2D" parent="."] position = Vector2(-2, 0) script = ExtResource("3_te0pl") _sunScene = ExtResource("4_b8hls") _amountPerSun = 25 -[node name="Behaviour" type="Node" parent="." index="4"] +[node name="Behaviour" type="Node" parent="."] script = ExtResource("5_26je0") -[node name="Timer" type="Timer" parent="Behaviour" index="0" node_paths=PackedStringArray("entity")] +[node name="Timer" type="Timer" parent="Behaviour" node_paths=PackedStringArray("entity")] wait_time = 24.25 script = ExtResource("7_rlkb7") entity = NodePath("../..") -[node name="StartTimer" type="Timer" parent="Behaviour" index="1" node_paths=PackedStringArray("entity")] +[node name="StartTimer" type="Timer" parent="Behaviour" node_paths=PackedStringArray("entity")] wait_time = 12.0 one_shot = true autostart = true script = ExtResource("7_rlkb7") entity = NodePath("../..") -[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] position = Vector2(0, 4) shape = SubResource("RectangleShape2D_4xs4g") -[node name="FlashController" parent="." index="6"] -shaderMaterial = SubResource("ShaderMaterial_mdjfv") +[node name="FlashController" type="Node" parent="."] +script = ExtResource("10_w3e3c") +shaderMaterial = ExtResource("2_yyn2e") +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] [connection signal="timeout" from="Behaviour/Timer" to="Behaviour" method="Timeout"] [connection signal="timeout" from="Behaviour/StartTimer" to="Behaviour" method="Timeout"] [connection signal="timeout" from="Behaviour/StartTimer" to="Behaviour/Timer" method="start"] diff --git a/scenes/entities/plants/threepeater.tscn b/scenes/entities/plants/threepeater.tscn index bd4e077..73e6100 100644 --- a/scenes/entities/plants/threepeater.tscn +++ b/scenes/entities/plants/threepeater.tscn @@ -1,9 +1,18 @@ -[gd_scene load_steps=20 format=3 uid="uid://eegv1qihfv2q"] +[gd_scene load_steps=30 format=3 uid="uid://eegv1qihfv2q"] -[ext_resource type="PackedScene" uid="uid://dy41q1kxray5t" path="res://scenes/entities/plants/peashooter.tscn" id="1_muntu"] +[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_833fu"] +[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_833fu"] [ext_resource type="Script" uid="uid://djpc0kvagpadv" path="res://scripts/entities/plants/ThreepeaterShooter.cs" id="2_ieami"] [ext_resource type="Texture2D" uid="uid://dyfa4462hu3w1" path="res://assets/sprites/atlases/plants/threepeater.png" id="2_j7h7q"] [ext_resource type="Script" uid="uid://hccb0aee0x0o" path="res://scripts/entities/plants/PlantEyesightLimiter.cs" id="3_dqn6w"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="4_ht2a0"] +[ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/projectiles/pea.tscn" id="6_kscbk"] +[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="7_anbbx"] +[ext_resource type="Script" uid="uid://bdk5iqtw4xbkl" path="res://scripts/entities/plants/behaviours/PeashooterBehaviour.cs" id="8_pp80j"] +[ext_resource type="Script" uid="uid://dn53jvpjyg63l" path="res://scripts/entities/plants/Eyesight.cs" id="9_salpp"] +[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="11_13f0q"] +[ext_resource type="AudioStream" uid="uid://dsv81mvrdg3w3" path="res://assets/audio/sfx/throw_generic.tres" id="12_4a4xw"] +[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="13_otw6n"] [sub_resource type="Animation" id="Animation_a2y0j"] length = 0.001 @@ -134,39 +143,89 @@ resource_local_to_scene = true [sub_resource type="SegmentShape2D" id="SegmentShape2D_yb26d"] resource_local_to_scene = true -[node name="Threepeater" instance=ExtResource("1_muntu")] -internal_id = "threepeater" +[sub_resource type="RectangleShape2D" id="RectangleShape2D_r7xnh"] +size = Vector2(20, 44) -[node name="Sprite2D" parent="." index="0"] +[node name="Threepeater" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] +script = ExtResource("1_833fu") +MaxHP = 30.0 +_player = NodePath("AnimationPlayer") +_tree = NodePath("AnimationTree") + +[node name="Sprite2D" type="Sprite2D" parent="."] +material = ExtResource("2_833fu") position = Vector2(6, -13) texture = ExtResource("2_j7h7q") hframes = 13 +vframes = 2 -[node name="AnimationPlayer" parent="." index="1"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { &"": SubResource("AnimationLibrary_ipp6b"), &"threepeater": SubResource("AnimationLibrary_o2obw") } +autoplay = "peashooter/idle" -[node name="AnimationTree" parent="." index="2"] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] tree_root = SubResource("AnimationNodeBlendTree_j7h7q") +anim_player = NodePath("../AnimationPlayer") +parameters/TimeScale/scale = 1.0 +parameters/Tree/conditions/ready = false +script = ExtResource("4_ht2a0") +entity = NodePath("..") -[node name="Shooter" parent="." index="3"] +[node name="Shooter" type="Marker2D" parent="." node_paths=PackedStringArray("_timer")] position = Vector2(20, -9) script = ExtResource("2_ieami") +_projectile = ExtResource("6_kscbk") +_timer = NodePath("FireTimer") -[node name="Timer" parent="Shooter" index="0"] -wait_time = 1.6 +[node name="FireTimer" type="Timer" parent="Shooter" node_paths=PackedStringArray("entity")] +wait_time = 1.5 +one_shot = true +script = ExtResource("7_anbbx") +entity = NodePath("../..") -[node name="CollisionShape2D" parent="Eysight" index="0"] +[node name="Behaviour" type="Node" parent="." node_paths=PackedStringArray("_shootTimer", "_sight")] +script = ExtResource("8_pp80j") +_shootTimer = NodePath("../Shooter/FireTimer") +_sight = NodePath("../Eysight") + +[node name="Eysight" type="Area2D" parent="."] +collision_layer = 4 +collision_mask = 8 +script = ExtResource("9_salpp") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Eysight"] shape = SubResource("SegmentShape2D_j7h7q") +script = ExtResource("3_dqn6w") -[node name="CollisionShape2D2" type="CollisionShape2D" parent="Eysight" index="1"] +[node name="CollisionShape2D2" type="CollisionShape2D" parent="Eysight"] position = Vector2(0, 60) shape = SubResource("SegmentShape2D_yb26d") script = ExtResource("3_dqn6w") -[node name="CollisionShape2D3" type="CollisionShape2D" parent="Eysight" index="2"] +[node name="CollisionShape2D3" type="CollisionShape2D" parent="Eysight"] position = Vector2(0, -60) shape = SubResource("SegmentShape2D_yb26d") script = ExtResource("3_dqn6w") + +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] +position = Vector2(0, 5) +shape = SubResource("RectangleShape2D_r7xnh") + +[node name="ChannelPlayer" type="Node" parent="."] +script = ExtResource("11_13f0q") +audioStream = ExtResource("12_4a4xw") +channel = "pea_shoot" +metadata/_custom_type_script = "uid://c36bj8u7jghc7" + +[node name="FlashController" type="Node" parent="."] +script = ExtResource("13_otw6n") +shaderMaterial = ExtResource("2_833fu") + +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] diff --git a/scenes/entities/plants/wallnut.tscn b/scenes/entities/plants/wallnut.tscn index ce6d938..86fc9ed 100644 --- a/scenes/entities/plants/wallnut.tscn +++ b/scenes/entities/plants/wallnut.tscn @@ -1,18 +1,12 @@ -[gd_scene load_steps=14 format=3 uid="uid://bq7imkpr2yqyr"] +[gd_scene load_steps=15 format=3 uid="uid://bq7imkpr2yqyr"] -[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_fluxn"] -[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_bi7an"] +[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_mnh2m"] +[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_mnh2m"] [ext_resource type="Texture2D" uid="uid://dstqh1wc5dvmo" path="res://assets/sprites/atlases/plants/wallnut.png" id="2_o5tda"] [ext_resource type="AnimationLibrary" uid="uid://0bdesb8j2mbo" path="res://assets/animations/plants/wallnut.res" id="3_xl65q"] [ext_resource type="Script" uid="uid://btkmd86pn828y" path="res://scripts/entities/plants/behaviours/HpBasedBehaviour.cs" id="4_cjtyy"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_ladjs"] -resource_local_to_scene = true -shader = ExtResource("2_bi7an") -shader_parameter/FLASH_COLOR = Color(1, 0.709804, 0.439216, 0.5) -shader_parameter/HIGHLIGHT_COLOR = Color(1, 0.709804, 0.439216, 0.5) -shader_parameter/selected = false -shader_parameter/blend = 0.0 +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="5_2hmhw"] +[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="7_frxj2"] [sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_y3tlf"] @@ -46,35 +40,47 @@ node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_khltr"] size = Vector2(33, 46) -[node name="Wallnut" instance=ExtResource("1_fluxn")] -internal_id = "wallnut" +[node name="Wallnut" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] +script = ExtResource("1_mnh2m") MaxHP = 600.0 +_player = NodePath("AnimationPlayer") +_tree = NodePath("AnimationTree") -[node name="Sprite2D" parent="." index="0"] -material = SubResource("ShaderMaterial_ladjs") +[node name="Sprite2D" type="Sprite2D" parent="."] +material = ExtResource("2_mnh2m") texture = ExtResource("2_o5tda") hframes = 12 vframes = 3 +frame = 10 -[node name="AnimationPlayer" parent="." index="1"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { &"wallnut": ExtResource("3_xl65q") } -[node name="AnimationTree" parent="." index="2"] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] tree_root = SubResource("AnimationNodeBlendTree_bi7an") +anim_player = NodePath("../AnimationPlayer") parameters/TimeScale/scale = 1.0 parameters/Tree/blend_position = 1.0 +script = ExtResource("5_2hmhw") +entity = NodePath("..") -[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] position = Vector2(3.5, 5) shape = SubResource("RectangleShape2D_khltr") -[node name="Behaviour" type="Node" parent="." index="4"] +[node name="Behaviour" type="Node" parent="."] script = ExtResource("4_cjtyy") parameters = Array[String](["parameters/Tree/blend_position"]) -[node name="FlashController" parent="." index="5"] -shaderMaterial = SubResource("ShaderMaterial_ladjs") +[node name="FlashController" type="Node" parent="."] +script = ExtResource("7_frxj2") +shaderMaterial = ExtResource("2_mnh2m") +[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] [connection signal="OnHPChanged" from="." to="Behaviour" method="OnHPChanged"] diff --git a/scenes/entities/tiles/base_tile.tscn b/scenes/entities/tiles/base_tile.tscn new file mode 100644 index 0000000..58bac5a --- /dev/null +++ b/scenes/entities/tiles/base_tile.tscn @@ -0,0 +1,23 @@ +[gd_scene load_steps=4 format=3 uid="uid://bfooovcq272ks"] + +[ext_resource type="Script" uid="uid://cq1dl578rbvrj" path="res://scripts/entities/InvulnerableEntity.cs" id="1_5ykcf"] +[ext_resource type="Script" uid="uid://bd1f7x1nin0i0" path="res://scripts/entities/AreaOfEffect.cs" id="2_qq7uk"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_5ykcf"] +size = Vector2(20, 26) + +[node name="BaseTile" type="Node2D"] +script = ExtResource("1_5ykcf") +MaxHP = 10.0 +completeInvulnerability = true + +[node name="Sprite2D" type="Sprite2D" parent="."] +position = Vector2(0, 12) + +[node name="EffectCollider" type="Area2D" parent="."] +collision_layer = 256 +collision_mask = 8 +script = ExtResource("2_qq7uk") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="EffectCollider"] +shape = SubResource("RectangleShape2D_5ykcf") diff --git a/scenes/entities/tiles/redirect_down_tile.tscn b/scenes/entities/tiles/redirect_down_tile.tscn new file mode 100644 index 0000000..b32fcd6 --- /dev/null +++ b/scenes/entities/tiles/redirect_down_tile.tscn @@ -0,0 +1,25 @@ +[gd_scene load_steps=6 format=3 uid="uid://cp8oadhwu51i7"] + +[ext_resource type="PackedScene" uid="uid://bfooovcq272ks" path="res://scenes/entities/tiles/base_tile.tscn" id="1_e3yor"] +[ext_resource type="Texture2D" uid="uid://c68mrfs4wb81x" path="res://assets/sprites/atlases/atlas2.png" id="2_xv011"] +[ext_resource type="Script" uid="uid://blky82wwkqirx" path="res://scripts/systems/effects/RedirectEffect.cs" id="3_q6o68"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_q6o68"] +atlas = ExtResource("2_xv011") +region = Rect2(160, 22, 41, 36) + +[sub_resource type="Resource" id="Resource_4mqps"] +script = ExtResource("3_q6o68") +tilesWalked = 0.2 +down = true +Duration = 1.0 +Slot = "redirect" +metadata/_custom_type_script = "uid://blky82wwkqirx" + +[node name="RedirectDownTile" instance=ExtResource("1_e3yor")] + +[node name="Sprite2D" parent="." index="0"] +texture = SubResource("AtlasTexture_q6o68") + +[node name="EffectCollider" parent="." index="1"] +givenEffect = SubResource("Resource_4mqps") diff --git a/scenes/entities/tiles/redirect_up_tile.tscn b/scenes/entities/tiles/redirect_up_tile.tscn new file mode 100644 index 0000000..1d719f6 --- /dev/null +++ b/scenes/entities/tiles/redirect_up_tile.tscn @@ -0,0 +1,25 @@ +[gd_scene load_steps=6 format=3 uid="uid://d4kee4ipw1k1q"] + +[ext_resource type="PackedScene" uid="uid://bfooovcq272ks" path="res://scenes/entities/tiles/base_tile.tscn" id="1_wp3vm"] +[ext_resource type="Texture2D" uid="uid://c68mrfs4wb81x" path="res://assets/sprites/atlases/atlas2.png" id="2_8aumo"] +[ext_resource type="Script" uid="uid://blky82wwkqirx" path="res://scripts/systems/effects/RedirectEffect.cs" id="2_le24f"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_ry33t"] +atlas = ExtResource("2_8aumo") +region = Rect2(110, 22, 42, 36) + +[sub_resource type="Resource" id="Resource_8aumo"] +script = ExtResource("2_le24f") +tilesWalked = 0.2 +down = false +Duration = 1.0 +Slot = "redirect" +metadata/_custom_type_script = "uid://blky82wwkqirx" + +[node name="RedirectUpTile" instance=ExtResource("1_wp3vm")] + +[node name="Sprite2D" parent="." index="0"] +texture = SubResource("AtlasTexture_ry33t") + +[node name="EffectCollider" parent="." index="1"] +givenEffect = SubResource("Resource_8aumo") diff --git a/scenes/entities/tiles/slow_tile.tscn b/scenes/entities/tiles/slow_tile.tscn new file mode 100644 index 0000000..f2d7b69 --- /dev/null +++ b/scenes/entities/tiles/slow_tile.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=6 format=3 uid="uid://cy0puq5mtnxq7"] + +[ext_resource type="PackedScene" uid="uid://bfooovcq272ks" path="res://scenes/entities/tiles/base_tile.tscn" id="1_jktsj"] +[ext_resource type="Texture2D" uid="uid://c68mrfs4wb81x" path="res://assets/sprites/atlases/atlas2.png" id="2_b65si"] +[ext_resource type="Script" uid="uid://3q40oeb4cabf" path="res://scripts/systems/effects/PermanentSpeedEffect.cs" id="3_b65si"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_b8lvr"] +atlas = ExtResource("2_b65si") +region = Rect2(260, 22, 42, 36) + +[sub_resource type="Resource" id="Resource_b8lvr"] +script = ExtResource("3_b65si") +Multiplier = 0.667 +Duration = 0.5 +Slot = "permanent_speed" +metadata/_custom_type_script = "uid://3q40oeb4cabf" + +[node name="SlowTile" instance=ExtResource("1_jktsj")] + +[node name="Sprite2D" parent="." index="0"] +texture = SubResource("AtlasTexture_b8lvr") + +[node name="EffectCollider" parent="." index="1"] +givenEffect = SubResource("Resource_b8lvr") diff --git a/scenes/entities/tiles/speed_tile.tscn b/scenes/entities/tiles/speed_tile.tscn new file mode 100644 index 0000000..be47bdf --- /dev/null +++ b/scenes/entities/tiles/speed_tile.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=6 format=3 uid="uid://c5lplejgx7mex"] + +[ext_resource type="PackedScene" uid="uid://bfooovcq272ks" path="res://scenes/entities/tiles/base_tile.tscn" id="1_0mgu2"] +[ext_resource type="Texture2D" uid="uid://c68mrfs4wb81x" path="res://assets/sprites/atlases/atlas2.png" id="2_770cq"] +[ext_resource type="Script" uid="uid://3q40oeb4cabf" path="res://scripts/systems/effects/PermanentSpeedEffect.cs" id="3_770cq"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_p8mgt"] +atlas = ExtResource("2_770cq") +region = Rect2(206, 22, 50, 37) + +[sub_resource type="Resource" id="Resource_p8mgt"] +script = ExtResource("3_770cq") +Multiplier = 1.333 +Duration = 0.5 +Slot = "permanent_speed" +metadata/_custom_type_script = "uid://3q40oeb4cabf" + +[node name="SpeedTile" instance=ExtResource("1_0mgu2")] + +[node name="Sprite2D" parent="." index="0"] +texture = SubResource("AtlasTexture_p8mgt") + +[node name="EffectCollider" parent="." index="1"] +givenEffect = SubResource("Resource_p8mgt") diff --git a/scenes/main_menu.tscn b/scenes/main_menu.tscn index 5c434df..57e395f 100644 --- a/scenes/main_menu.tscn +++ b/scenes/main_menu.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=19 format=3 uid="uid://bfstrli64u23y"] +[gd_scene load_steps=20 format=3 uid="uid://bfstrli64u23y"] [ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_jk1qb"] [ext_resource type="Script" uid="uid://drru785m4eep" path="res://scripts/gui/main_menu_rich_text.gd" id="2_5dd4i"] @@ -11,7 +11,7 @@ [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="7_7b55j"] [ext_resource type="Texture2D" uid="uid://drydueofrb448" path="res://assets/sprites/gui/almanach/book.tres" id="7_flqon"] [ext_resource type="AudioStream" uid="uid://bdx83fokp6kha" path="res://assets/audio/sfx/buttonclick.mp3" id="8_5pajh"] -[ext_resource type="AudioStream" uid="uid://djgyc7bbwcepp" path="res://assets/audio/music/Александр Зацепин - Увертюра.mp3" id="9_j7ex8"] +[ext_resource type="AudioStream" uid="uid://cp7c8ys8sk2r0" path="res://assets/audio/music/Toxa/Upcoming Serenity.wav" id="12_1ajci"] [ext_resource type="PackedScene" uid="uid://bvpt0q4j6nx18" path="res://scenes/gui/almanach.tscn" id="12_rcqid"] [ext_resource type="PackedScene" uid="uid://djfsa0pxqeoq1" path="res://scenes/gui/cursor_canvas_layer.tscn" id="14_1ajci"] @@ -36,6 +36,10 @@ texture_margin_top = 6.0 texture_margin_right = 6.0 texture_margin_bottom = 6.0 +[sub_resource type="AudioStreamPlaylist" id="AudioStreamPlaylist_7b55j"] +stream_count = 1 +stream_0 = ExtResource("12_1ajci") + [sub_resource type="GDScript" id="GDScript_flqon"] resource_name = "version_label" script/source = "extends Label @@ -195,7 +199,7 @@ channel = "button" metadata/_custom_type_script = "uid://c36bj8u7jghc7" [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] -stream = ExtResource("9_j7ex8") +stream = SubResource("AudioStreamPlaylist_7b55j") volume_db = -20.0 autoplay = true bus = &"MusicBus" diff --git a/scenes/particles/aloe_effect.tscn b/scenes/particles/aloe_effect.tscn new file mode 100644 index 0000000..591a1ff --- /dev/null +++ b/scenes/particles/aloe_effect.tscn @@ -0,0 +1,155 @@ +[gd_scene load_steps=14 format=3 uid="uid://b3na62o5pu1gt"] + +[ext_resource type="Texture2D" uid="uid://k60ylegy845j" path="res://assets/sprites/atlases/tile_animations.png" id="1_4r1tv"] +[ext_resource type="Script" uid="uid://5ve2i0iu5oxr" path="res://scripts/particles/MixedParticles.cs" id="1_ftbe0"] +[ext_resource type="Texture2D" uid="uid://c68mrfs4wb81x" path="res://assets/sprites/atlases/atlas2.png" id="2_mhmlv"] + +[sub_resource type="Animation" id="Animation_mhmlv"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Sprite2D/GPUParticles2D:emitting") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Sprite2D:self_modulate") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 1)] +} + +[sub_resource type="Animation" id="Animation_4r1tv"] +resource_name = "main" +length = 1.33334 +step = 0.0833333 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.166667, 0.333333, 0.728266, 0.916667), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 1, 0] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Sprite2D/GPUParticles2D:emitting") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.333333), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [false, true] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Sprite2D:self_modulate") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0.916667, 1.33333), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_ftbe0"] +_data = { +&"RESET": SubResource("Animation_mhmlv"), +&"main": SubResource("Animation_4r1tv") +} + +[sub_resource type="AtlasTexture" id="AtlasTexture_mhmlv"] +atlas = ExtResource("1_4r1tv") +region = Rect2(150, 0, 150, 50) +filter_clip = true + +[sub_resource type="AtlasTexture" id="AtlasTexture_ftbe0"] +atlas = ExtResource("2_mhmlv") +region = Rect2(79, 102, 15, 15) + +[sub_resource type="Curve" id="Curve_ftbe0"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1e-05, 0), 0.0, 0.0, 0, 0, Vector2(0.152284, 1), 0.0, 0.0, 0, 0] +point_count = 3 + +[sub_resource type="CurveTexture" id="CurveTexture_100so"] +curve = SubResource("Curve_ftbe0") + +[sub_resource type="Curve" id="Curve_q4bj6"] +_data = [Vector2(0, 1), 0.0, -1.0, 0, 1, Vector2(1, 0), -1.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_dajq0"] +curve = SubResource("Curve_q4bj6") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_100so"] +particle_flag_disable_z = true +emission_shape = 1 +emission_sphere_radius = 20.0 +direction = Vector3(0, -1, 0) +spread = 0.0 +flatness = 1.0 +initial_velocity_min = 115.79 +initial_velocity_max = 115.79 +scale_curve = SubResource("CurveTexture_dajq0") +alpha_curve = SubResource("CurveTexture_100so") + +[node name="AloeEffect" type="Node2D" node_paths=PackedStringArray("emitter")] +script = ExtResource("1_ftbe0") +emitter = NodePath("Sprite2D/GPUParticles2D") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +&"": SubResource("AnimationLibrary_ftbe0") +} +autoplay = "main" + +[node name="Sprite2D" type="Sprite2D" parent="."] +z_index = -1 +z_as_relative = false +position = Vector2(0, 22) +texture = SubResource("AtlasTexture_mhmlv") +offset = Vector2(0, -13.1) +hframes = 3 + +[node name="GPUParticles2D" type="GPUParticles2D" parent="Sprite2D"] +z_index = 50 +z_as_relative = false +position = Vector2(0, -1) +emitting = false +texture = SubResource("AtlasTexture_ftbe0") +one_shot = true +explosiveness = 0.25 +fixed_fps = 60 +process_material = SubResource("ParticleProcessMaterial_100so") diff --git a/scenes/projectiles/cucumber_projectile.tscn b/scenes/projectiles/cucumber_projectile.tscn index b314338..e3e56af 100644 --- a/scenes/projectiles/cucumber_projectile.tscn +++ b/scenes/projectiles/cucumber_projectile.tscn @@ -1,24 +1,23 @@ -[gd_scene load_steps=3 format=3 uid="uid://c1ig40gtdcb60"] +[gd_scene load_steps=5 format=3 uid="uid://pf8sq0bk3epn"] -[ext_resource type="PackedScene" uid="uid://pf8sq0bk3epn" path="res://scenes/projectiles/cucumber_projectile_part.tscn" id="1_3auks"] +[ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/projectiles/pea.tscn" id="1_iyfw1"] +[ext_resource type="Texture2D" uid="uid://c68mrfs4wb81x" path="res://assets/sprites/atlases/atlas2.png" id="2_12o6v"] -[sub_resource type="GDScript" id="GDScript_3auks"] -resource_name = "cucumber" -script/source = "extends Node2D +[sub_resource type="AtlasTexture" id="AtlasTexture_h74iy"] +atlas = ExtResource("2_12o6v") +region = Rect2(24, 88, 7, 13) +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_iyfw1"] +radius = 6.0 +height = 24.0 -func _ready() -> void: - await get_tree().process_frame - get_child(0).reparent(get_parent()) - get_child(0).reparent(get_parent()) - queue_free() -" +[node name="CucumberProjectile" instance=ExtResource("1_iyfw1")] +_speed = 5.0 +_damage = 25 -[node name="CucumberProjectileScene" type="Node2D"] -script = SubResource("GDScript_3auks") +[node name="Sprite" parent="." index="0"] +rotation = -1.5708 +texture = SubResource("AtlasTexture_h74iy") -[node name="CucumberProjectile" parent="." instance=ExtResource("1_3auks")] -rotation = 1.5708 - -[node name="CucumberProjectile2" parent="." instance=ExtResource("1_3auks")] -rotation = 4.71239 +[node name="CollisionShape2D" parent="." index="1"] +shape = SubResource("CapsuleShape2D_iyfw1") diff --git a/scenes/projectiles/cucumber_projectile_compound.tscn b/scenes/projectiles/cucumber_projectile_compound.tscn new file mode 100644 index 0000000..cfa3618 --- /dev/null +++ b/scenes/projectiles/cucumber_projectile_compound.tscn @@ -0,0 +1,13 @@ +[gd_scene load_steps=3 format=3 uid="uid://c1ig40gtdcb60"] + +[ext_resource type="PackedScene" uid="uid://pf8sq0bk3epn" path="res://scenes/projectiles/cucumber_projectile.tscn" id="1_3auks"] +[ext_resource type="Script" uid="uid://j6nq8w2n8532" path="res://scripts/projectiles/CompoundProjectile.cs" id="1_pmbxx"] + +[node name="CucumberProjectileScene" type="Node2D"] +script = ExtResource("1_pmbxx") + +[node name="CucumberProjectile" parent="." instance=ExtResource("1_3auks")] +rotation = 1.5708 + +[node name="CucumberProjectile2" parent="." instance=ExtResource("1_3auks")] +rotation = 4.71239 diff --git a/scenes/projectiles/cucumber_projectile_part.tscn b/scenes/projectiles/cucumber_projectile_part.tscn deleted file mode 100644 index e3e56af..0000000 --- a/scenes/projectiles/cucumber_projectile_part.tscn +++ /dev/null @@ -1,23 +0,0 @@ -[gd_scene load_steps=5 format=3 uid="uid://pf8sq0bk3epn"] - -[ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/projectiles/pea.tscn" id="1_iyfw1"] -[ext_resource type="Texture2D" uid="uid://c68mrfs4wb81x" path="res://assets/sprites/atlases/atlas2.png" id="2_12o6v"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_h74iy"] -atlas = ExtResource("2_12o6v") -region = Rect2(24, 88, 7, 13) - -[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_iyfw1"] -radius = 6.0 -height = 24.0 - -[node name="CucumberProjectile" instance=ExtResource("1_iyfw1")] -_speed = 5.0 -_damage = 25 - -[node name="Sprite" parent="." index="0"] -rotation = -1.5708 -texture = SubResource("AtlasTexture_h74iy") - -[node name="CollisionShape2D" parent="." index="1"] -shape = SubResource("CapsuleShape2D_iyfw1") diff --git a/scenes/projectiles/repeater_projectile.tscn b/scenes/projectiles/repeater_projectile.tscn new file mode 100644 index 0000000..e207ded --- /dev/null +++ b/scenes/projectiles/repeater_projectile.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://b45wmmcie6yeg"] + +[ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/projectiles/pea.tscn" id="1_6vktd"] + +[node name="RepeaterProjectile" type="Node2D"] + +[node name="Pea" parent="." instance=ExtResource("1_6vktd")] + +[node name="Pea2" parent="." instance=ExtResource("1_6vktd")] +position = Vector2(-21, 0) diff --git a/scenes/templates/level_template.tscn b/scenes/templates/level_template.tscn index 337191a..60fa513 100644 --- a/scenes/templates/level_template.tscn +++ b/scenes/templates/level_template.tscn @@ -622,23 +622,27 @@ Structures = NodePath("Structures") Particles = NodePath("Particles") [node name="Zombies" type="Node2D" parent="Pools"] -z_index = 3 +z_index = 20 +z_as_relative = false y_sort_enabled = true [node name="Plants" type="Node2D" parent="Pools"] -z_index = 1 +z_as_relative = false y_sort_enabled = true [node name="Projectiles" type="Node2D" parent="Pools"] -z_index = 4 +z_index = 30 +z_as_relative = false y_sort_enabled = true [node name="Structures" type="Node2D" parent="Pools"] -z_index = 2 +z_index = 10 +z_as_relative = false y_sort_enabled = true [node name="Particles" type="Node2D" parent="Pools"] -z_index = 5 +z_index = 40 +z_as_relative = false [node name="Lines" type="Node2D" parent="."] script = ExtResource("3_4bmqp") @@ -688,6 +692,8 @@ layer = -2 follow_viewport_enabled = true [node name="Background" type="Sprite2D" parent="Background"] +z_index = -100 +z_as_relative = false position = Vector2(500, 200) texture = ExtResource("4_y72yf") metadata/_edit_lock_ = true @@ -828,7 +834,7 @@ follow_viewport_enabled = true script = ExtResource("13_0x4ji") [node name="Hitbox" type="Area2D" parent="GameOverZombie/LoseZone"] -collision_layer = 2 +collision_layer = 6 [node name="CollisionShape2D" type="CollisionShape2D" parent="GameOverZombie/LoseZone/Hitbox"] position = Vector2(122, 199.5) diff --git a/scenes/templates/plant_template.tscn b/scenes/templates/plant_template.tscn index 158bd36..a259d5b 100644 --- a/scenes/templates/plant_template.tscn +++ b/scenes/templates/plant_template.tscn @@ -1,7 +1,6 @@ -[gd_scene load_steps=5 format=3 uid="uid://b1hjjbdwf1rtc"] +[gd_scene load_steps=4 format=3 uid="uid://b1hjjbdwf1rtc"] [ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_324sd"] -[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_3uws4"] [ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="2_e75pf"] [ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="4_3uws4"] @@ -11,7 +10,6 @@ _player = NodePath("AnimationPlayer") _tree = NodePath("AnimationTree") [node name="Sprite2D" type="Sprite2D" parent="."] -material = ExtResource("2_3uws4") [node name="AnimationPlayer" type="AnimationPlayer" parent="."] @@ -26,6 +24,5 @@ collision_mask = 0 [node name="FlashController" type="Node" parent="."] script = ExtResource("4_3uws4") -shaderMaterial = ExtResource("2_3uws4") [connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] diff --git a/scripts/Newlon.cs b/scripts/Newlon.cs index 9a4d5ea..aa01d14 100644 --- a/scripts/Newlon.cs +++ b/scripts/Newlon.cs @@ -1,9 +1,14 @@ +using Godot; + namespace Newlon; public static class LON { - public static float Pr(string path) + public static void ForceFinishTween(Tween tween) { - return 0; + if (tween == null) return; + + tween.Pause(); + tween.CustomStep(Mathf.Inf); } } \ No newline at end of file diff --git a/scripts/SaveSerializer.cs b/scripts/SaveSerializer.cs index 5a66922..3a8ee44 100644 --- a/scripts/SaveSerializer.cs +++ b/scripts/SaveSerializer.cs @@ -42,7 +42,7 @@ public partial class SaveSerializer : Node foreach (var plant in playerProgress.PlayerPlants) { - save.PlayerPlants.Add(plant.internal_id); + save.PlayerPlants.Add(plant.GetInternalID()); } access.StoreString(JsonSerializer.Serialize(save)); diff --git a/scripts/entities/AreaOfEffect.cs b/scripts/entities/AreaOfEffect.cs new file mode 100644 index 0000000..153ae33 --- /dev/null +++ b/scripts/entities/AreaOfEffect.cs @@ -0,0 +1,21 @@ +using Godot; +using Newlon.Systems.Effects; + +namespace Newlon.Components; + +public partial class AreaOfEffect : Area2D +{ + [Export] public Effect givenEffect; + public override void _Ready() + { + AreaEntered += OnAreaEntered; + } + + public void OnAreaEntered(Area2D what) + { + if (what.GetParent() is Entity entity) + { + entity.GiveEffect(givenEffect); + } + } +} diff --git a/scripts/entities/AreaOfEffect.cs.uid b/scripts/entities/AreaOfEffect.cs.uid new file mode 100644 index 0000000..6bbb667 --- /dev/null +++ b/scripts/entities/AreaOfEffect.cs.uid @@ -0,0 +1 @@ +uid://bd1f7x1nin0i0 diff --git a/scripts/entities/Entity.cs b/scripts/entities/Entity.cs index 697f69f..8720ca5 100644 --- a/scripts/entities/Entity.cs +++ b/scripts/entities/Entity.cs @@ -113,8 +113,7 @@ public partial class Entity : Node2D #region Effects [Export] private Array _effectImmunities = new(); [Export] private bool completeInvulnerability = false; - private readonly Dictionary _activeEffectSlots = new(); - private readonly Dictionary _effectSlotTimers = new(); + private readonly Dictionary effectHandlers = new(); [Signal] public delegate void EffectStartedEventHandler(Effect what); [Signal] public delegate void EffectEndedEventHandler(Effect what); @@ -123,50 +122,25 @@ public partial class Entity : Node2D public virtual void GiveEffect(Effect what) { - if (Killed) return; - if (_effectImmunities.Contains(what) || completeInvulnerability) - { + if (what == null || + Killed || + completeInvulnerability || _effectImmunities.Contains(what)) return; - } - string slot = what.Slot; - if (_activeEffectSlots.ContainsKey(slot) == false) - { + var slot = what.Slot; + if (effectHandlers.ContainsKey(slot) == false) InitSlot(slot); - } - if (what == _activeEffectSlots[slot]) + if (effectHandlers[slot].HandledEffect == what) { - EmitSignal(SignalName.EffectContinued, what); + effectHandlers[slot].Restart(); } else { - EmitSignal(SignalName.EffectStarted, what); + effectHandlers[slot].HandledEffect = what; + effectHandlers[slot].Start(); } - if (_activeEffectSlots[slot] != null) - { - _effectSlotTimers[slot].Stop(); - _activeEffectSlots[slot].Exit(this); - } - _effectSlotTimers[slot].WaitTime = what.Duration; - _effectSlotTimers[slot].Start(); - - what.Enter(this); - _activeEffectSlots[slot] = what; - - } - - private void InitSlot(string key) - { - _activeEffectSlots.Add(key, null); - - var timer = new Timer() { Autostart = false, OneShot = true }; - AddChild(timer); - timer.Timeout += () => { EndEffectAtSlot(key); }; - - _effectSlotTimers.Add(key, timer); - } public void EndEffect(Effect what) @@ -174,34 +148,48 @@ public partial class Entity : Node2D EndEffectAtSlot(what.Slot); } + public Tween CreateTweenEffect(Effect effect) + { + Tween tween = CreateTween(); + + effectHandlers[effect.Slot].EffectTween = tween; + + return tween; + } + protected void ClearEffects() { - foreach (var slot in _activeEffectSlots.Keys) + foreach (var slot in effectHandlers.Keys) { - if (_activeEffectSlots[slot] != null) - { - _activeEffectSlots[slot].Exit(this); - _effectSlotTimers[slot].Stop(); - _activeEffectSlots[slot] = null; - } + effectHandlers[slot].End(); } } + private void InitSlot(string key) + { + effectHandlers.Add(key, new EffectHandler()); + effectHandlers[key].handler = this; + effectHandlers[key].EffectTimer = new(); + + AddChild(effectHandlers[key].EffectTimer); + effectHandlers[key].EffectTimer.Name = key + "Timer"; + + effectHandlers[key].EffectTimer.Timeout += () => { EndEffectAtSlot(key); }; + } public void ProcessEffects() { - if (Killed) return; - foreach (string key in _activeEffectSlots.Keys) - _activeEffectSlots[key]?.Process(this); + foreach (var slot in effectHandlers.Keys) + { + effectHandlers[slot].Process(); + } } private void EndEffectAtSlot(string slot) { - _activeEffectSlots[slot].Exit(this); - _activeEffectSlots[slot] = null; - - EmitSignal(SignalName.EffectEnded, _activeEffectSlots[slot]); - + EmitSignal(SignalName.EffectEnded, effectHandlers[slot].HandledEffect); + effectHandlers[slot].End(); } + #endregion #region LocalTimescale private float _localTimescale = 1.0f; diff --git a/scripts/entities/InvulnerableEntity.cs b/scripts/entities/InvulnerableEntity.cs new file mode 100644 index 0000000..dc41ac7 --- /dev/null +++ b/scripts/entities/InvulnerableEntity.cs @@ -0,0 +1,14 @@ +using Godot; + +namespace Newlon.Components; + +public partial class InvulnerableEntity : Entity +{ + public override void TakeDamage(float amount, Node origin) + { + } + public override void Heal(float amount, Node origin) + { + } + +} diff --git a/scripts/entities/InvulnerableEntity.cs.uid b/scripts/entities/InvulnerableEntity.cs.uid new file mode 100644 index 0000000..4462658 --- /dev/null +++ b/scripts/entities/InvulnerableEntity.cs.uid @@ -0,0 +1 @@ +uid://cq1dl578rbvrj diff --git a/scripts/entities/plants/RuntimePlantData.cs b/scripts/entities/plants/RuntimePlantData.cs index dd0b42e..a6ddd56 100644 --- a/scripts/entities/plants/RuntimePlantData.cs +++ b/scripts/entities/plants/RuntimePlantData.cs @@ -10,8 +10,6 @@ namespace Newlon.Components.Plants; public partial class RuntimePlantData : Entity { - [Export] - public string internal_id; public int Line { get; set; } public PlantResource Resource; private AudioStream eatenSound = ResourceLoader.Load("res://assets/audio/sfx/gulp.mp3"); @@ -22,7 +20,7 @@ public partial class RuntimePlantData : Entity } public override void Kill() { - PoolContainer.Instance.EntityField[Resource.Layer].Remove(GlobalPosition); + PoolContainer.Instance.RemoveEntity(GlobalPosition, Resource.Layer); QueueFree(); } } diff --git a/scripts/entities/plants/behaviours/AloeBehaviour.cs b/scripts/entities/plants/behaviours/AloeBehaviour.cs index 420abf6..9286900 100644 --- a/scripts/entities/plants/behaviours/AloeBehaviour.cs +++ b/scripts/entities/plants/behaviours/AloeBehaviour.cs @@ -8,12 +8,13 @@ public partial class AloeBehaviour : BaseBehaviour [Export] private float _hpTreshold = 0.25f; private Timer _timer; private bool _charge = true; + private PackedScene particlesPacked = ResourceLoader.Load("uid://b3na62o5pu1gt"); public override void _Ready() - { + { base._Ready(); - _timer = GetNode("Timer"); - } + _timer = GetNode("Timer"); + } public override void _Process(double delta) { @@ -34,9 +35,12 @@ public partial class AloeBehaviour : BaseBehaviour public void Heal() { var checkPos = GetParent().GlobalPosition + Vector2.Right * FieldParams.TileWidth; - if (PoolContainer.Instance.TryGetEntity(checkPos, out RuntimePlantData plantData)) - { - plantData.Heal(300, GetParent()); + if (PoolContainer.Instance.TryGetEntity(checkPos, out RuntimePlantData plantData)) + { + plantData.Heal(300, GetParent()); + var particles = particlesPacked.Instantiate(); + PoolContainer.Instance.Particles.AddChild(particles); + particles.GlobalPosition = plantData.GlobalPosition; } } diff --git a/scripts/gui/LevelGUIElements.cs b/scripts/gui/LevelGUIElements.cs index e79eea4..62e567d 100644 --- a/scripts/gui/LevelGUIElements.cs +++ b/scripts/gui/LevelGUIElements.cs @@ -15,4 +15,5 @@ public partial class LevelGUIElements : Control { Instance = this; } + } diff --git a/scripts/gui/ShovelButton.cs b/scripts/gui/ShovelButton.cs index c1ba12e..4853b35 100644 --- a/scripts/gui/ShovelButton.cs +++ b/scripts/gui/ShovelButton.cs @@ -96,7 +96,7 @@ public partial class ShovelButton : TextureButton var checkedPosition = (position / FieldParams.Tile).Ceil() * FieldParams.Tile - new Vector2(20, 14); for (int i = FieldParams.LayersCount - 1; i >= 0; i--) { - if (PoolContainer.Instance.EntityField[i].TryGetValue(checkedPosition, out var entity) && entity is RuntimePlantData plantData) + if (PoolContainer.Instance.TryGetEntity(checkedPosition, out RuntimePlantData plantData,i)) { return plantData; } diff --git a/scripts/gui/choose_your_seeds/CYSFocusSetup.cs b/scripts/gui/choose_your_seeds/CYSFocusSetup.cs index dd18203..8df6ef9 100644 --- a/scripts/gui/choose_your_seeds/CYSFocusSetup.cs +++ b/scripts/gui/choose_your_seeds/CYSFocusSetup.cs @@ -15,48 +15,18 @@ public partial class CYSFocusSetup : Node Control control = grid.GetChild(i); - // If it isn't leftmost element - if (x != 0) - { - control.FocusNeighborLeft = control.GetPathTo(grid.GetChild(PositionToIndex(x - 1, y))); - } - // If it isn't upmost element - if (y != 0) - { - control.FocusNeighborTop = control.GetPathTo(grid.GetChild(PositionToIndex(x, y - 1))); - } - else + if (y == 0) { control.FocusNeighborTop = control.GetPathTo(textContainer); } - // If it isn't rightmost element - if (x != grid.Columns - 1 && i != grid.GetChildCount()) + if (x == grid.Columns - 1) { - control.FocusNeighborRight = control.GetPathTo(grid.GetChild(PositionToIndex(x + 1, y))); - } - else - { - if (y != 0) - { - control.FocusNeighborRight = control.GetPathTo(grid.GetChild(PositionToIndex(x + 1, y - 1))); - } - else - { - control.FocusNeighborRight = control.GetPathTo(button); - } - } - if (PositionToIndex(x, y + 1) < grid.GetChildCount()) - { - control.FocusNeighborBottom = control.GetPathTo(grid.GetChild(PositionToIndex(x, y + 1))); + control.FocusNeighborRight = control.GetPathTo(button); } } QueueFree(); } - private int PositionToIndex(int x, int y) - { - return y * grid.Columns + x; - } } diff --git a/scripts/gui/choose_your_seeds/GridLoader.cs b/scripts/gui/choose_your_seeds/GridLoader.cs index 3f2c24f..286321f 100644 --- a/scripts/gui/choose_your_seeds/GridLoader.cs +++ b/scripts/gui/choose_your_seeds/GridLoader.cs @@ -7,7 +7,7 @@ namespace Newlon.Components.GUI; public partial class GridLoader : GridContainer { private PackedScene _plantCard; - const string SEEDPACKED_UID = "uid://e7vutg71l6f2"; + public const string SEEDPACKED_UID = "uid://e7vutg71l6f2"; public override void _Ready() { _plantCard = ResourceLoader.Load(SEEDPACKED_UID); @@ -24,11 +24,21 @@ public partial class GridLoader : GridContainer slot.SetResource(resource); - slot.SetForbidden(RuntimeLevelData.LevelResource.forbiddenPlants.Contains(resource.internal_id)); + slot.SetForbidden(RuntimeLevelData.LevelResource.forbiddenPlants.Contains(resource.GetInternalID())); slot.SetLocked(PlayerProgress.Instance.PlayerPlants.Contains(resource) == false); if (GetChildCount() == 1) slot.GrabFocus(); - var handler = new ChoosableHandler(slot); - slot.SetHandler(handler); + + if (RuntimeLevelData.LevelResource.prepickedPlants.Contains(resource.GetInternalID())) + { + slot.SetHandler(new PrepickedDummyHandler(slot)); + slot.disablePacket = true; + } + else + { + slot.SetHandler(new ChoosableHandler(slot)); + } + + } } } diff --git a/scripts/gui/seedpackets/HotbarPregameHandler.cs b/scripts/gui/seedpackets/HotbarPregameHandler.cs index 0f9a656..eded986 100644 --- a/scripts/gui/seedpackets/HotbarPregameHandler.cs +++ b/scripts/gui/seedpackets/HotbarPregameHandler.cs @@ -25,6 +25,7 @@ public class HotbarPregameHandler : SeedpacketHandler, ISeedpacketPress if (state == RuntimeLevelData.LevelStates.Game) { _owner.SetHandler(new HotbarHandler(_owner)); + _owner.StartWithResourceOffset(); } else if (state != RuntimeLevelData.LevelStates.ChooseYourSeeds) { diff --git a/scripts/gui/seedpackets/PrepickedDummyHandler.cs b/scripts/gui/seedpackets/PrepickedDummyHandler.cs new file mode 100644 index 0000000..5c11a1e --- /dev/null +++ b/scripts/gui/seedpackets/PrepickedDummyHandler.cs @@ -0,0 +1,16 @@ +namespace Newlon.Components.GUI.Seedpackets; +public class PrepickedDummyHandler : SeedpacketHandler +{ + public PrepickedDummyHandler(Seedpacket owner) : base(owner) + { + if (LevelGUIElements.Instance.SeedpacketsHotbar.GetChildCount() >= PlayerProgress.Instance.MaxSeedpackets) return; + _owner.disablePacket = true; + + var hotbarSeedpacket = Seedpacket.Prefab.Instantiate(); + LevelGUIElements.Instance.SeedpacketsHotbar.AddChild(hotbarSeedpacket); + hotbarSeedpacket.SetResource(_owner.GetResource()); + + hotbarSeedpacket.SetHandler(new PrepickedHandler(hotbarSeedpacket)); + hotbarSeedpacket.disablePacket = true; + } +} \ No newline at end of file diff --git a/scripts/gui/seedpackets/PrepickedDummyHandler.cs.uid b/scripts/gui/seedpackets/PrepickedDummyHandler.cs.uid new file mode 100644 index 0000000..9c0ffdc --- /dev/null +++ b/scripts/gui/seedpackets/PrepickedDummyHandler.cs.uid @@ -0,0 +1 @@ +uid://c7uf1ygofsurs diff --git a/scripts/gui/seedpackets/PrepickedHandler.cs b/scripts/gui/seedpackets/PrepickedHandler.cs new file mode 100644 index 0000000..0988e56 --- /dev/null +++ b/scripts/gui/seedpackets/PrepickedHandler.cs @@ -0,0 +1,24 @@ +using Newlon.Components.Level; + +namespace Newlon.Components.GUI.Seedpackets; + +public class PrepickedHandler : SeedpacketHandler +{ + public PrepickedHandler(Seedpacket owner) : base(owner) + { + RuntimeLevelData.Instance.OnLevelStateChanged += OnLevelStateChanged; + } + + public void OnLevelStateChanged(RuntimeLevelData.LevelStates state) + { + if (state == RuntimeLevelData.LevelStates.Game) + { + _owner.SetHandler(new HotbarHandler(_owner)); + _owner.StartWithResourceOffset(); + } + else if (state != RuntimeLevelData.LevelStates.ChooseYourSeeds) + { + _owner.disablePacket = true; + } + } +} \ No newline at end of file diff --git a/scripts/gui/seedpackets/PrepickedHandler.cs.uid b/scripts/gui/seedpackets/PrepickedHandler.cs.uid new file mode 100644 index 0000000..8205a20 --- /dev/null +++ b/scripts/gui/seedpackets/PrepickedHandler.cs.uid @@ -0,0 +1 @@ +uid://d3da4b6e4qwtm diff --git a/scripts/gui/seedpackets/Seedpacket.cs b/scripts/gui/seedpackets/Seedpacket.cs index 23fe08d..dae46e7 100644 --- a/scripts/gui/seedpackets/Seedpacket.cs +++ b/scripts/gui/seedpackets/Seedpacket.cs @@ -81,6 +81,11 @@ public partial class Seedpacket : TextureButton { _timer.Start(); } + public void StartWithResourceOffset() + { + _timer.Start(_resource.ReloadTime * (1.0 - _resource.ReloadProgress)+0.05); + Callable.From(()=>{ _timer.WaitTime = _resource.ReloadTime; }).CallDeferred(); + } public void OnUnfocused() { diff --git a/scripts/level/InitialPackedSceneSpawner.cs b/scripts/level/InitialPackedSceneSpawner.cs index 98dad91..f5e9a64 100644 --- a/scripts/level/InitialPackedSceneSpawner.cs +++ b/scripts/level/InitialPackedSceneSpawner.cs @@ -33,20 +33,20 @@ public partial class InitialPackedSceneSpawner : Node if (entity is RuntimeZombieData) { PoolContainer.Instance.Zombies.AddChild(node); - node.GlobalPosition = position + new Vector2(0,0.5f*FieldParams.TileHeight); + node.GlobalPosition = position + new Vector2(0, 0.5f * FieldParams.TileHeight); } else if (entity is RuntimePlantData plant) { PoolContainer.Instance.Plants.AddChild(plant); node.GlobalPosition = position; - plant.Resource = GameRegistry.GetEntityByName(plant.internal_id) as PlantResource; - PoolContainer.Instance.EntityField[plant.Resource.Layer].Add(plant.GlobalPosition, plant); + plant.Resource = GameRegistry.GetEntityByName(plant.Resource.GetInternalID()) as PlantResource; + PoolContainer.Instance.TrySetEntity(plant.GlobalPosition, plant, plant.Resource.Layer); } else { PoolContainer.Instance.Structures.AddChild(entity); node.GlobalPosition = position; - PoolContainer.Instance.EntityField[1].Add(entity.GlobalPosition, entity); + PoolContainer.Instance.TrySetEntity(entity.GlobalPosition,entity,1); } } else diff --git a/scripts/level/PlantField.cs b/scripts/level/PlantField.cs index d54a11b..aac1a4b 100644 --- a/scripts/level/PlantField.cs +++ b/scripts/level/PlantField.cs @@ -59,7 +59,7 @@ public partial class PlantField : Node2D bool canPlace = _resource != null && inBoundary - && PoolContainer.Instance.EntityField[_resource.Layer].ContainsKey(expected_pos) == false + && PoolContainer.Instance.IsPositionVacant(expected_pos,_resource.Layer) && RuntimeLevelData.Instance.CheckSpendSun((int)_resource.Cost); // Setting visuals @@ -96,7 +96,7 @@ public partial class PlantField : Node2D plant.GlobalPosition = (_plantSetter.GlobalPosition / FieldParams.Tile).Ceil() * FieldParams.Tile - new Vector2(20, 14); plant.Resource = (PlantResource)_resource; - PoolContainer.Instance.EntityField[_resource.Layer].Add(plant.GlobalPosition, plant); + PoolContainer.Instance.TrySetEntity(plant.GlobalPosition,plant,_resource.Layer); RuntimeLevelData.Instance.SpendSun((int)_resource.Cost); diff --git a/scripts/level/PoolContainer.cs b/scripts/level/PoolContainer.cs index 4be8269..156d47e 100644 --- a/scripts/level/PoolContainer.cs +++ b/scripts/level/PoolContainer.cs @@ -24,39 +24,39 @@ public partial class PoolContainer : Node2D public static PoolContainer Instance { get; private set; } - public Dictionary[] EntityField = { new(), new(), new() }; + //public Dictionary[] EntityField = { new(), new(), new() }; + private readonly Entity[,] EntityField = new Entity[3,FieldParams.ColumnsCount * FieldParams.RowsCount]; public override void _EnterTree() { Instance = this; } - public bool TryGetEntity(Vector2 key, out Entity result, int layer = 1) + public bool TryGetEntity(Vector2 positionVector, out T result, int layer = 1) where T : Entity { - if (EntityField[layer].ContainsKey(key)) - { - result = EntityField[layer][key]; - } - else - { - result = null; - } - return EntityField[layer].ContainsKey(key) - && EntityField[layer][key] != null; - } - - public bool TryGetEntity(Vector2 key, out T result, int layer = 1) where T : class - { - if (EntityField[layer].ContainsKey(key)) - { - result = EntityField[layer][key] as T; - } - else - { - result = null; - } - return EntityField[layer].ContainsKey(key) - && EntityField[layer][key] != null + var position = VectorToIndex(positionVector); + result = EntityField[layer, position] as T; + return EntityField[layer,position] != null && result != null; } + public bool TrySetEntity(Vector2 positionVector, Entity whatToSet, int layer = 1) + { + var position = VectorToIndex(positionVector); + if (IsPositionVacant(positionVector, layer) == false) return false; + EntityField[layer, position] = whatToSet; + return true; + } + public bool IsPositionVacant(Vector2 positionVector, int layer = 1) + { + return EntityField[layer, VectorToIndex(positionVector)] == null; + } + public void RemoveEntity(Vector2 positionVector, int layer = 1) + { + EntityField[layer, VectorToIndex(positionVector)] = null; + } + public static int VectorToIndex(Vector2 vector) + { + var intedVec = (vector - FieldParams.LeftFieldBoundary) / FieldParams.Tile; + return (int)intedVec.X + (int)intedVec.Y * FieldParams.ColumnsCount; + } public void SpawnParticles(PackedScene particles, Vector2 position, float rotation = 0) { diff --git a/scripts/level/zombe_spawners/SurvivalZombieSpawner.cs b/scripts/level/zombe_spawners/SurvivalZombieSpawner.cs index b2af6a6..ca11ba6 100644 --- a/scripts/level/zombe_spawners/SurvivalZombieSpawner.cs +++ b/scripts/level/zombe_spawners/SurvivalZombieSpawner.cs @@ -94,7 +94,7 @@ public partial class SurvivalZombieSpawner : Node foreach (var zom in wave) { - ZombieSequencer.Instance.Add(zom.internal_id); + ZombieSequencer.Instance.Add(zom.GetInternalID()); } big_wave = false; diff --git a/scripts/particles/MixedParticles.cs b/scripts/particles/MixedParticles.cs new file mode 100644 index 0000000..f487357 --- /dev/null +++ b/scripts/particles/MixedParticles.cs @@ -0,0 +1,12 @@ +using Godot; + +namespace Newlon.Particles; + +public partial class MixedParticles : Node2D +{ + [Export] private GpuParticles2D emitter; + public override void _Ready() + { + emitter.Finished += ()=> { QueueFree(); }; + } +} diff --git a/scripts/particles/MixedParticles.cs.uid b/scripts/particles/MixedParticles.cs.uid new file mode 100644 index 0000000..22eaca3 --- /dev/null +++ b/scripts/particles/MixedParticles.cs.uid @@ -0,0 +1 @@ +uid://5ve2i0iu5oxr diff --git a/scripts/projectiles/CompoundProjectile.cs b/scripts/projectiles/CompoundProjectile.cs new file mode 100644 index 0000000..7d19124 --- /dev/null +++ b/scripts/projectiles/CompoundProjectile.cs @@ -0,0 +1,22 @@ +using Godot; + +public partial class CompoundProjectile : Node2D +{ + // Called when the node enters the scene tree for the first time. + public override void _Ready() + { + GetTree().ProcessFrame += ReleaseCompound; + } + + public void ReleaseCompound() + { + GetTree().ProcessFrame -= ReleaseCompound; + + foreach (var child in GetChildren()) + { + child.Reparent(GetParent()); + } + + QueueFree(); + } +} diff --git a/scripts/projectiles/CompoundProjectile.cs.uid b/scripts/projectiles/CompoundProjectile.cs.uid new file mode 100644 index 0000000..e2bac87 --- /dev/null +++ b/scripts/projectiles/CompoundProjectile.cs.uid @@ -0,0 +1 @@ +uid://j6nq8w2n8532 diff --git a/scripts/resources/entities/EntityResource.cs b/scripts/resources/entities/EntityResource.cs index c84ec52..45d0c9a 100644 --- a/scripts/resources/entities/EntityResource.cs +++ b/scripts/resources/entities/EntityResource.cs @@ -12,7 +12,17 @@ public partial class EntityResource : Resource [Export] public Texture2D Preview; [Export] public CustomSeedpacketFrame CustomFrame; [Export] public int Order = 0; - public string internal_id; public string parsedDescription; public bool isDescriptionParsed; + private string internal_id = ""; + public string GetInternalID() + { + if (internal_id == "") + { + string[] splitstr = ResourcePath.Split('/'); + string file = splitstr[splitstr.Length - 1].ToLower(); + internal_id = file.TrimSuffix(".tres"); + } + return internal_id; + } } diff --git a/scripts/systems/GameRegistry.cs b/scripts/systems/GameRegistry.cs index 372af94..562eb8c 100644 --- a/scripts/systems/GameRegistry.cs +++ b/scripts/systems/GameRegistry.cs @@ -21,8 +21,7 @@ public partial class GameRegistry : Node if (ResourceLoader.Exists(PLANT_RESOURCE_PATH + file)) { var plant = ResourceLoader.Load(PLANT_RESOURCE_PATH + file); - plant.internal_id = file.ToLower().Split('.')[0]; - EntityDictionary.Add(file.ToLower().Split('.')[0], plant); + EntityDictionary.Add(plant.GetInternalID(), plant); } } //Zombie init @@ -33,8 +32,7 @@ public partial class GameRegistry : Node if (ResourceLoader.Exists(ZOMBIE_RESOURCE_PATH + file)) { var zombie = ResourceLoader.Load(ZOMBIE_RESOURCE_PATH + file); - zombie.internal_id = file.ToLower().Split('.')[0]; - EntityDictionary.Add(file.ToLower().Split('.')[0], zombie); + EntityDictionary.Add(zombie.GetInternalID(), zombie); } } } diff --git a/scripts/systems/effects/Effect.cs b/scripts/systems/effects/Effect.cs index aa80f70..738eade 100644 --- a/scripts/systems/effects/Effect.cs +++ b/scripts/systems/effects/Effect.cs @@ -1,12 +1,19 @@ using Godot; +using Newlon.Components; namespace Newlon.Systems.Effects; +[GlobalClass] public abstract partial class Effect : Resource { [Export] public float Duration; [Export] public string Slot; - public abstract void Enter(Node target); - public abstract void Process(Node target); - public abstract void Exit(Node target); + public abstract void Enter(Entity target); + public abstract void Process(Entity target); + public abstract void Exit(Entity target); + + private Tween CreateTween(Entity fromEntity) + { + return fromEntity.CreateTweenEffect(this); + } } diff --git a/scripts/systems/effects/EffectHandler.cs b/scripts/systems/effects/EffectHandler.cs new file mode 100644 index 0000000..d47209a --- /dev/null +++ b/scripts/systems/effects/EffectHandler.cs @@ -0,0 +1,49 @@ +using Godot; +using Newlon.Components; + +namespace Newlon.Systems.Effects; + +public partial class EffectHandler : RefCounted +{ + public Entity handler; + public Effect HandledEffect; + public Timer EffectTimer; + public Tween EffectTween; + + public void Start() + { + EffectTimer.WaitTime = HandledEffect.Duration; + EffectTimer.Start(); + + HandledEffect.Enter(handler); + } + public void End() + { + if (HandledEffect == null) return; + HandledEffect.Exit(handler); + HandledEffect = null; + EffectTimer.Stop(); + if (EffectTween != null) + { + LON.ForceFinishTween(EffectTween); + EffectTween.Kill(); + } + } + public void Process() + { + HandledEffect.Process(handler); + } + public void Restart() + { + HandledEffect.Exit(handler); + EffectTimer.Stop(); + if (EffectTween != null) + { + LON.ForceFinishTween(EffectTween); + EffectTween.Kill(); + } + + HandledEffect.Enter(handler); + EffectTimer.Start(); + } +} diff --git a/scripts/systems/effects/EffectHandler.cs.uid b/scripts/systems/effects/EffectHandler.cs.uid new file mode 100644 index 0000000..5bbd866 --- /dev/null +++ b/scripts/systems/effects/EffectHandler.cs.uid @@ -0,0 +1 @@ +uid://csxb8rllqjb1t diff --git a/scripts/systems/effects/GarlicEffect.cs b/scripts/systems/effects/GarlicEffect.cs deleted file mode 100644 index f8966ab..0000000 --- a/scripts/systems/effects/GarlicEffect.cs +++ /dev/null @@ -1,59 +0,0 @@ -using Godot; -using Newlon.Components.Zombies; - -namespace Newlon.Systems.Effects; - -public partial class GarlicEffect : Effect -{ - [Export] private float tilesWalked = 0.2f; - RandomNumberGenerator RandomNumberGenerator; - - public override void Enter(Node target) - { - if(RandomNumberGenerator == null) - { - RandomNumberGenerator = new RandomNumberGenerator(); - RandomNumberGenerator.Randomize(); - } - if(target is RuntimeZombieData zombieData) - zombieData.AbleToEat = false; - //Animation call - } - - public override void Exit(Node target) - { - if(target is RuntimeZombieData zombieData) - { - int mult; - if((int)zombieData.GlobalPosition.Y/FieldParams.TileHeight <= 2) - { - mult = 1; - } - else if((int)zombieData.GlobalPosition.Y/FieldParams.TileHeight >= 6) - { - mult = -1; - } - else - { - if(RandomNumberGenerator.RandiRange(0,1) == 0) - { - mult = 1; - } - else - { - mult = -1; - } - } - zombieData.AbleToEat = false; - var tween = zombieData.CreateTween(); - tween.TweenProperty(zombieData,"position:y",zombieData.GlobalPosition.Y + FieldParams.TileHeight * mult, Duration); - tween.Parallel().TweenProperty(zombieData, "position:x", zombieData.GlobalPosition.X - FieldParams.TileHeight * tilesWalked, Duration); - tween.TweenCallback(Callable.From(() => {zombieData.AbleToEat = true;})); - } - } - - public override void Process(Node target) - { - - } -} diff --git a/scripts/systems/effects/PermanentSpeedEffect.cs b/scripts/systems/effects/PermanentSpeedEffect.cs new file mode 100644 index 0000000..88c2203 --- /dev/null +++ b/scripts/systems/effects/PermanentSpeedEffect.cs @@ -0,0 +1,24 @@ +using Godot; +using Newlon.Components; + +namespace Newlon.Systems.Effects; + +[GlobalClass] +public partial class PermanentSpeedEffect : Effect +{ + [Export] public float Multiplier; + + public override void Enter(Entity target) + { + target.LocalTimescale *= Multiplier; + } + + public override void Exit(Entity target) + { + } + + public override void Process(Entity target) + { + + } +} diff --git a/scripts/systems/effects/PermanentSpeedEffect.cs.uid b/scripts/systems/effects/PermanentSpeedEffect.cs.uid new file mode 100644 index 0000000..a18520a --- /dev/null +++ b/scripts/systems/effects/PermanentSpeedEffect.cs.uid @@ -0,0 +1 @@ +uid://3q40oeb4cabf diff --git a/scripts/systems/effects/RandomRedirectEffect.cs b/scripts/systems/effects/RandomRedirectEffect.cs new file mode 100644 index 0000000..63cd05d --- /dev/null +++ b/scripts/systems/effects/RandomRedirectEffect.cs @@ -0,0 +1,67 @@ +using Godot; +using Newlon.Components; +using Newlon.Components.Zombies; + +namespace Newlon.Systems.Effects; + +[GlobalClass] +public partial class RandomRedirectEffect : Effect +{ + [Export] private float tilesWalked = 0.2f; + [Export] private float travelTime = 1; + RandomNumberGenerator RandomNumberGenerator; + + public override void Enter(Entity target) + { + if (RandomNumberGenerator == null) + { + RandomNumberGenerator = new RandomNumberGenerator(); + RandomNumberGenerator.Randomize(); + } + if (target is RuntimeZombieData zombieData) + zombieData.AbleToEat = false; + //Animation call + Animation(target); + } + + public override void Exit(Entity target) + { + + } + private void Animation(Entity target) + { + if (target is RuntimeZombieData zombieData) + { + int mult; + if ((int)zombieData.GlobalPosition.Y / FieldParams.TileHeight <= 2) + { + mult = 1; + } + else if ((int)zombieData.GlobalPosition.Y / FieldParams.TileHeight >= 6) + { + mult = -1; + } + else + { + if (RandomNumberGenerator.RandiRange(0, 1) == 0) + { + mult = 1; + } + else + { + mult = -1; + } + } + zombieData.AbleToEat = false; + var tween = zombieData.CreateTweenEffect(this); + tween.TweenInterval(Duration-travelTime); + tween.TweenProperty(zombieData, "position:y", zombieData.GlobalPosition.Y + FieldParams.TileHeight * mult, travelTime); + tween.Parallel().TweenProperty(zombieData, "position:x", zombieData.GlobalPosition.X - FieldParams.TileHeight * tilesWalked, travelTime); + tween.TweenCallback(Callable.From(() => { zombieData.AbleToEat = true; })); + } + } + public override void Process(Entity target) + { + + } +} diff --git a/scripts/systems/effects/GarlicEffect.cs.uid b/scripts/systems/effects/RandomRedirectEffect.cs.uid similarity index 100% rename from scripts/systems/effects/GarlicEffect.cs.uid rename to scripts/systems/effects/RandomRedirectEffect.cs.uid diff --git a/scripts/systems/effects/RedirectEffect.cs b/scripts/systems/effects/RedirectEffect.cs new file mode 100644 index 0000000..197ba94 --- /dev/null +++ b/scripts/systems/effects/RedirectEffect.cs @@ -0,0 +1,55 @@ +using Godot; +using Newlon.Components.Zombies; +using Newlon.Components; + +namespace Newlon.Systems.Effects; + +[GlobalClass] +public partial class RedirectEffect : Effect +{ + [Export] private float tilesWalked = 0.2f; + [Export] private bool down = false; + + public override void Enter(Entity target) + { + if (target is RuntimeZombieData zombieData) + { + zombieData.AbleToEat = false; + //Animation call + int mult; + if ((int)zombieData.GlobalPosition.Y / FieldParams.TileHeight <= 2) + { + mult = 1; + } + else if ((int)zombieData.GlobalPosition.Y / FieldParams.TileHeight >= 6) + { + mult = -1; + } + else + { + if (down) + { + mult = 1; + } + else + { + mult = -1; + } + } + zombieData.AbleToEat = false; + var tween = zombieData.CreateTweenEffect(this); + tween.TweenProperty(zombieData, "global_position:y", zombieData.GlobalPosition.Y + FieldParams.TileHeight * mult, Duration); + tween.Parallel().TweenProperty(zombieData, "global_position:x", zombieData.GlobalPosition.X - FieldParams.TileWidth * tilesWalked, Duration); + tween.TweenCallback(Callable.From(() => { zombieData.AbleToEat = true; })); + } + } + + public override void Exit(Entity target) + { + } + + public override void Process(Entity target) + { + + } +} diff --git a/scripts/systems/effects/RedirectEffect.cs.uid b/scripts/systems/effects/RedirectEffect.cs.uid new file mode 100644 index 0000000..2c898ac --- /dev/null +++ b/scripts/systems/effects/RedirectEffect.cs.uid @@ -0,0 +1 @@ +uid://blky82wwkqirx diff --git a/scripts/systems/effects/SlownessEffect.cs b/scripts/systems/effects/SlownessEffect.cs index 19d7a4e..64c328e 100644 --- a/scripts/systems/effects/SlownessEffect.cs +++ b/scripts/systems/effects/SlownessEffect.cs @@ -1,34 +1,28 @@ using Godot; using Newlon.Components; -using System; namespace Newlon.Systems.Effects; +[GlobalClass] public partial class SlownessEffect : Effect { [Export] public Color ColorOverride; [Export] public float Multiplier; - public override void Enter(Node target) + public override void Enter(Entity target) { - if (target is Entity entity) - { - entity.LocalTimescale *= Multiplier; - entity.Modulate = ColorOverride; - } + target.LocalTimescale *= Multiplier; + target.Modulate = ColorOverride; } - public override void Exit(Node target) + public override void Exit(Entity target) { - if (target is Entity entity) - { - entity.LocalTimescale /= Multiplier; - entity.Modulate = Colors.White; - } + target.LocalTimescale /= Multiplier; + target.Modulate = Colors.White; } - public override void Process(Node target) + public override void Process(Entity target) { - + } } diff --git a/scripts/systems/static-data/FieldParams.cs b/scripts/systems/static-data/FieldParams.cs index 4eca66e..e3f0d26 100644 --- a/scripts/systems/static-data/FieldParams.cs +++ b/scripts/systems/static-data/FieldParams.cs @@ -7,6 +7,8 @@ public class FieldParams public const int TileWidth = 50; public const int TileHeight = 60; public const int LayersCount = 3; + public const int ColumnsCount = 9; + public const int RowsCount = 5; public static Vector2I LeftFieldBoundary = new(305, 76); public static Vector2I RightFieldBoundary = new(755, 376); public static readonly Vector2 Tile = new(TileWidth, TileHeight); diff --git a/translations/gui.csv b/translations/gui.csv index 25e4c41..82f9121 100644 --- a/translations/gui.csv +++ b/translations/gui.csv @@ -42,10 +42,12 @@ DETERMINATION Peachniil SergeiManagement Tyamonster +Deem0n155 [/ul] [center][color=cyan]Special thanks[/color][/center] [ul] [img]uid://y2hhywmmy0t5[/img][font=uid://bor21ae1lks57]Aleksej ""[color=pink]Second beam[/color]"" Mirenkov[/font] +[font=uid://bor21ae1lks57]LIL AQ — Music[/font] [/ul] All rights for Plants versus Zombies franchise belong to PopCap games","[center][font_size=24]О нас[/font_size][/center] Сделано в [color=steel_blue]Godot Engine [img=16]res://icon.svg[/img][/color] @@ -62,10 +64,12 @@ DETERMINATION Peachniil SergeiManagement Tyamonster +Deem0n155 [/ul] [center][color=cyan]Special thanks[/color][/center] [ul] [img]uid://y2hhywmmy0t5[/img][font=uid://bor21ae1lks57]Алексей ""[color=pink]Second beam[/color]"" Миренков[/font] +[font=uid://bor21ae1lks57]Lil AQ — музыка[/font] [/ul] Все права на Plants versus Zombies франшизу принадлежат PopCap games." close,Close,Закрыть diff --git a/translations/gui.en.translation b/translations/gui.en.translation index 5557c20..412b460 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 b5ecc21..d15e23b 100644 Binary files a/translations/gui.ru.translation and b/translations/gui.ru.translation differ diff --git a/translations/plants.csv b/translations/plants.csv index 4d161f1..aa61116 100644 --- a/translations/plants.csv +++ b/translations/plants.csv @@ -1,93 +1,93 @@ keys,en,ru aloe,Aloe,Алоэ aloe_desc,"Health points: [color=DARK_RED]{MaxHP}[/color] -Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. +Seedpacket recharge time: [color=DARK_RED]{ReloadTime} seconds[/color]. Ability recharge time: [color=DARK_RED]{wait_time} seconds[/color]. Heals plant when it has [color=DARK_RED]{_hpTreshold|%}%[/color] of its health.","Очки здоровья: [color=dark_red]{MaxHP}[/color]. -Время перезарядки: [color=dark_red]{ReloadTime} секунд[/color]. +Время готовности пакета: [color=dark_red]{ReloadTime} секунд[/color]. Время перезарядки способности: [color=dark_red]{wait_time} секунд[/color]. Лечит растения [color=DARK_RED] с {_hpTreshold|%}% [/color] здоровья." garlic,Garlic,Чеснок garlic_desc,"Health points: [color=DARK_RED]{MaxHP}[/color] -Reload time: [color=DARK_RED]{ReloadTime} seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color] -Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]." +Seedpacket recharge time: [color=DARK_RED]{ReloadTime} seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color] +Время готовности пакета: [color=DARK_RED]{ReloadTime} секунд[/color]." peashooter,Peashooter,Горохострел peashooter_desc,"Health points: [color=DARK_RED]{MaxHP}[/color]. -Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. +Seedpacket recharge time: [color=DARK_RED]{ReloadTime} seconds[/color]. Pea damage: [color=DARK_RED]{_damage}[/color]. Firerate: [color=DARK_RED]{FireTimer.wait_time} seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. -Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]. +Время готовности пакета: [color=DARK_RED]{ReloadTime} секунд[/color]. Урон от гороха: [color=DARK_RED]{_damage}[/color]. Задержка стрельбы: [color=DARK_RED]{FireTimer.wait_time} секунды[/color]." potatomine,Potato mine,Картофельная мина potatomine_desc,"Health points: [color=DARK_RED]{MaxHP}[/color]. -Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. +Seedpacket recharge time: [color=DARK_RED]{ReloadTime} seconds[/color]. Explosion damage: [color=DARK_RED]{damage}[/color]. Prime time: [color=DARK_RED]{PrimeTimer.wait_time} seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. -Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]. +Время готовности пакета: [color=DARK_RED]{ReloadTime} секунд[/color]. Урон от взрыва: [color=DARK_RED]{damage}[/color]. Время роста: [color=DARK_RED]{PrimeTimer.wait_time} секунд[/color]." snowpea,Snowpea,Снежный горох snowpea_desc,"Health points: [color=DARK_RED]{MaxHP}[/color]. -Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. +Seedpacket recharge time: [color=DARK_RED]{ReloadTime} seconds[/color]. Pea damage: [color=DARK_RED]{_damage}[/color]. Firerate: [color=DARK_RED]{FireTimer.wait_time} seconds[/color]. Slow percentage: [color=STEEL_BLUE]{Multiplier|*-1|+1|%}%[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. -Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]. +Время готовности пакета: [color=DARK_RED]{ReloadTime} секунд[/color]. Урон от гороха: [color=DARK_RED]{_damage}[/color]. Задержка стрельбы: [color=DARK_RED]{FireTimer.wait_time} секунды[/color]. Процент замедления: [color=STEEL_BLUE]{Multiplier|*-1|+1|%}%[/color]." spikeweed,Spikeweed,Колючка spikeweed_desc,"Health points: [color=DARK_RED]{MaxHP}[/color]. -Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. +Seedpacket recharge time: [color=DARK_RED]{ReloadTime} seconds[/color]. Damage per second: [color=DARK_RED]{_damage|*invokationsPerSecond}[/color]. [color=transparent]{invokationsPerSecond}[/color]","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. -Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]. +Время готовности пакета: [color=DARK_RED]{ReloadTime} секунд[/color]. Урон в секунду: [color=DARK_RED]{_damage|*invokationsPerSecond}[/color]. [color=transparent]{invokationsPerSecond}[/color]." sunflower,Sunflower,Подсолнух sunflower_desc,"Health points: [color=DARK_RED]{MaxHP}[/color] -Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. +Seedpacket recharge time: [color=DARK_RED]{ReloadTime} seconds[/color]. Initial sun production time: [color=DARK_RED]{StartTimer.wait_time} seconds[/color]. Sun production time: [color=DARK_RED]{Timer.wait_time} seconds[/color](After first sun produced).","Очки здоровья: [color=DARK_RED]{MaxHP}[/color] -Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]. +Время готовности пакета: [color=DARK_RED]{ReloadTime} секунд[/color]. Изначальная задержка выработки солнца: [color=DARK_RED]{StartTimer.wait_time} секунд[/color]. Задержка выработки солнца: [color=DARK_RED]{Timer.wait_time} секунды[/color](После первого солнца)." threepeater,Threepeater,Тристрел threepeater_desc,"Health points: [color=DARK_RED]{MaxHP}[/color]. -Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. +Seedpacket recharge time: [color=DARK_RED]{ReloadTime} seconds[/color]. Pea damage: [color=DARK_RED]{_damage}[/color] ([color=darkred]{_damage|*3}[/color] in close proximity). Firerate: [color=DARK_RED]{FireTimer.wait_time} seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color]. -Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]. +Время готовности пакета: [color=DARK_RED]{ReloadTime} секунд[/color]. Урон от гороха: [color=DARK_RED]{_damage}[/color] ([color=darkred]{_damage|*3}[/color] вблизи). Задержка стрельбы: [color=DARK_RED]{FireTimer.wait_time} секунд[/color]." wallnut,Wallnut,Стенорех wallnut_desc,"Health points: [color=DARK_RED]{MaxHP}[/color] -Reload time: [color=DARK_RED]{ReloadTime} seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color] -Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]." +Seedpacket recharge time: [color=DARK_RED]{ReloadTime} seconds[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color] +Время готовности пакета: [color=DARK_RED]{ReloadTime} секунд[/color]." nerdus,Pickly cactus,Колкий кактус nerdus_desc,"He is very critical about other’s behaviour. He likes to pay people back in kind. Health points: [color=darkred] {MaxHP}[/color]. -Reload time: [color=darkred] {ReloadTime} seconds[/color]. +Seedpacket recharge time: [color=darkred] {ReloadTime} seconds[/color]. Damage conversion: [color=darkred]1 bite = {bitesToPeas} peas [/color].","Он очень критичен к поведению других. Ему нравится отплачивать людям добром за добро. Очки здоровья: [color=darkred] {MaxHP}[/color]. -Время перезарядки: [color=darkred]{ReloadTime} секунд[/color]. +Время готовности пакета: [color=darkred]{ReloadTime} секунд[/color]. Конвертация урона: [color=darkred]1 укус = {bitesToPeas} горошин [/color]." cucumber,Cucumber,Огурец cucumber_desc,"He has a little trouble with differentiating left and right, so he doesn't make this choice at all. Health points: [color=darkred] {MaxHP}[/color]. -Reload time: [color=darkred] {ReloadTime} seconds[/color]. +Seedpacket recharge time: [color=darkred] {ReloadTime} seconds[/color]. Seed damage: [color=darkred] {_damage}[/color]. Firerate: [color=darkred] {FireTimer.wait_time} seconds[/color].","Он имеет небольшие проблемы с различением левого и правого, поэтому он не думает об этом вовсе. Очки здоровья: [color=darkred] {MaxHP}[/color]. -Время перезарядки: [color=darkred]{ReloadTime} секунд[/color]. +Время готовности пакета: [color=darkred]{ReloadTime} секунд[/color]. Урон семечка: [color=darkred] {_damage}[/color]. Скорость стрельбы: [color=darkred]{FireTimer.wait_time} секунд[/color]." snipach,Snipach,Спинат snipach_desc,"Health points: [color=DARK_RED]{MaxHP}[/color] -Reload time: [color=DARK_RED]{ReloadTime} seconds[/color]. +Seedpacket recharge time: [color=DARK_RED]{ReloadTime} seconds[/color]. Shot damage: [color=darkred]{_damage}[/color]. -Ability recharge: [color=darkred]{Timer.wait_time}[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color] -Время перезарядки: [color=DARK_RED]{ReloadTime} секунд[/color]. +Reload time: [color=darkred]{Timer.wait_time}[/color].","Очки здоровья: [color=DARK_RED]{MaxHP}[/color] +Время готовности пакета: [color=DARK_RED]{ReloadTime} секунд[/color]. Урон за выстрел: [color=darkred]{_damage}[/color]. Перезарядка способности: [color=darkred]{Timer.wait_time}[/color]." diff --git a/translations/plants.en.translation b/translations/plants.en.translation index 9729c48..de149a3 100644 Binary files a/translations/plants.en.translation and b/translations/plants.en.translation differ diff --git a/translations/plants.ru.translation b/translations/plants.ru.translation index 1d66222..548442a 100644 Binary files a/translations/plants.ru.translation and b/translations/plants.ru.translation differ diff --git a/translations/rewards.csv.import b/translations/rewards.csv.import index 0030832..5e333f6 100644 --- a/translations/rewards.csv.import +++ b/translations/rewards.csv.import @@ -3,11 +3,13 @@ importer="csv_translation" type="Translation" uid="uid://xvsya47m66cl" -valid=false [deps] +files=["res://translations/rewards.en.translation", "res://translations/rewards.ru.translation"] + source_file="res://translations/rewards.csv" +dest_files=["res://translations/rewards.en.translation", "res://translations/rewards.ru.translation"] [params] diff --git a/translations/rewards.en.translation b/translations/rewards.en.translation index 2283c31..e0de196 100644 Binary files a/translations/rewards.en.translation and b/translations/rewards.en.translation differ diff --git a/translations/rewards.ru.translation b/translations/rewards.ru.translation index 214dd3f..3bfbef4 100644 Binary files a/translations/rewards.ru.translation and b/translations/rewards.ru.translation differ diff --git a/translations/zombies.csv b/translations/zombies.csv index ee7be48..6e13014 100644 --- a/translations/zombies.csv +++ b/translations/zombies.csv @@ -3,35 +3,35 @@ basic,Basic zombie,Обычный зомби basic_desc,"The most basic zombie that Zomboss has. Health points: [color=darkred]{MaxHP}[/color]. Walk speed: [color=darkred]{Speed} tiles/second[/color]. -Attack speed: [color=darkred]{invokationsPerSecond} Hz[/color]. +Attack frequency: [color=darkred]{invokationsPerSecond} Hz[/color]. Attack damage: [color=darkred]{Damage}[/color]. ","Самый обычный зомби, который есть у Зомбосса. Очки здоровья: [color=darkred]{MaxHP}[/color]. Скорость ходьбы: [color=darkred]{Speed} клеток/сек[/color]. -Скорость атаки: [color=darkred]{invokationsPerSecond} Гц[/color]. +Частота атаки: [color=darkred]{invokationsPerSecond} Гц[/color]. Урон от атаки: [color=darkred]{Damage}[/color]." buckethead,Buckethead,Ведроголовый buckethead_desc,"Wears metal to protect his remaining brains. Equivalent of ~7 zombies. Health points: [color=darkred]{?.MaxHP}[/color]. Armor points: [color=darkred]{Armor.MaxHP}[/color]. Walk speed: [color=darkred]{Speed} tiles/second[/color]. -Attack speed: [color=darkred]{invokationsPerSecond} Hz[/color]. +Attack frequency: [color=darkred]{invokationsPerSecond} Hz[/color]. Attack damage: [color=darkred]{Damage}[/color]. ","Носит ведро чтобы защитить остатки мозгов. Равен примерно 7 зомби. Очки здоровья: [color=darkred]{?.MaxHP}[/color]. Очки брони: [color=darkred]{Armor.MaxHP}[/color]. Скорость ходьбы: [color=darkred]{Speed} клеток/сек[/color]. -Скорость атаки: [color=darkred]{invokationsPerSecond} Гц[/color]. +Частота атаки: [color=darkred]{invokationsPerSecond} Гц[/color]. Урон от атаки: [color=darkred]{Damage}[/color]." conehead,Conehead,Конусоголовый conehead_desc,"Armoured version of basic zombie. Equivalent of ~3 zombies. Health points: [color=darkred]{?.MaxHP}[/color]. Armor points: [color=darkred]{Armor.MaxHP}[/color]. Walk speed: [color=darkred]{Speed} tiles/second[/color]. -Attack speed: [color=darkred]{invokationsPerSecond} Hz[/color]. +Attack frequency: [color=darkred]{invokationsPerSecond} Hz[/color]. Attack damage: [color=darkred]{Damage}[/color]. ","Бронированная версия базового зомби. Равен примерно трём зомби. Очки здоровья: [color=darkred]{?.MaxHP}[/color]. Очки брони: [color=darkred]{Armor.MaxHP}[/color]. Скорость ходьбы: [color=darkred]{Speed} клеток/сек[/color]. -Скорость атаки: [color=darkred]{invokationsPerSecond} Гц[/color]. +Частота атаки: [color=darkred]{invokationsPerSecond} Гц[/color]. Урон от атаки: [color=darkred]{Damage}[/color]." hobo,Trash can zombie,Зомби в мусорке hobo_desc,"Some time in the past he met a great conqueror. Hates to live without his can. Equivalent of ~8 zombies. @@ -40,14 +40,14 @@ Health points: [color=darkred]{?.MaxHP}[/color]. Armor points: [color=darkred]{CanArmor.MaxHP}[/color]. Walk speed: [color=darkred]{Speed} tiles/second[/color]. Run speed: [color=darkred]{Speed|*3} tiles/second[/color]. -Attack speed when calm: [color=darkred]{invokationsPerSecond} Hz[/color]. -Attack speed when enraged: [color=darkred]{invokationsPerSecond|*3} Hz[/color]. +Attack frequency when calm: [color=darkred]{invokationsPerSecond} Hz[/color]. +Attack frequency when enraged: [color=darkred]{invokationsPerSecond|*3} Hz[/color]. Attack damage: [color=darkred]{Damage}[/color]. ","Однажды повстречал великого полководца. Ненавидит жить без своего ведра. Равен примерно 8 зомби. [color=darkgreen]Имеет иммунитет к эффекту чеснока. [/color] Очки здоровья: [color=darkred]{?.MaxHP}[/color]. Очки брони: [color=darkred]{CanArmor.MaxHP}[/color]. Скорость ходьбы: [color=darkred]{Speed} клеток/сек[/color]. Скорость бега: [color=darkred]{Speed|*3} клеток/сек[/color]. -Скорость атаки в покое: [color=darkred]{invokationsPerSecond} Гц[/color]. -Скорость атаки в гневе: [color=darkred]{invokationsPerSecond|*3} Гц[/color]. +Частота атаки в покое: [color=darkred]{invokationsPerSecond} Гц[/color]. +Частота атаки в гневе: [color=darkred]{invokationsPerSecond|*3} Гц[/color]. Урон от атаки: [color=darkred]{Damage}[/color]. " diff --git a/translations/zombies.en.translation b/translations/zombies.en.translation index fce99db..60ced28 100644 Binary files a/translations/zombies.en.translation and b/translations/zombies.en.translation differ diff --git a/translations/zombies.ru.translation b/translations/zombies.ru.translation index 1b3e2e0..bd7ec7e 100644 Binary files a/translations/zombies.ru.translation and b/translations/zombies.ru.translation differ