Added Pole animations

This commit is contained in:
CaTronick 2025-07-31 01:19:13 +03:00
commit 8a79fc869a
142 changed files with 5147 additions and 1158 deletions

1
addons/pvzadventure/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
cache/

View file

@ -8,11 +8,17 @@ public partial class AdventureLevelResource : Resource
{ {
[Export] public int startSun = 50; [Export] public int startSun = 50;
//[Export] public Array<Conditions> conditions; //[Export] public Array<Conditions> conditions;
[ExportGroup("Wave properties")]
[Export(PropertyHint.Range, "0,1,0.01")] public float wavePercentage; [Export(PropertyHint.Range, "0,1,0.01")] public float wavePercentage;
[Export] public float standardWaveDelay; [Export] public float standardWaveDelay;
[Export] public float initialWaveDelay; [Export] public float initialWaveDelay;
[Export] public RewardResource reward; [Export] public RewardResource reward;
[Export] public Array<string> forbiddenPlants; [ExportGroup("Editor-edited properties")]
[Export] public Array<WaveData> waves; [ExportSubgroup("Seedpackets")]
[Export] public Array<string> forbiddenPlants = new();
[Export] public Array<string> forbiddenTags = new();
[Export] public Array<string> prepickedPlants = new();
[ExportSubgroup("Waves")]
[Export] public Array<WaveData> waves = new();
[Export] public Array<PackedScene> initialScenes = [.. new PackedScene[45]]; [Export] public Array<PackedScene> initialScenes = [.. new PackedScene[45]];
} }

View file

@ -4,7 +4,7 @@ using Godot;
[Tool] [Tool]
public partial class PvZAdventure : EditorPlugin public partial class PvZAdventure : EditorPlugin
{ {
private PackedScene panel = ResourceLoader.Load<PackedScene>("res://addons/pvzadventure/scenes/adventure_editor.tscn"); private PackedScene panel = ResourceLoader.Load<PackedScene>("uid://dkq82o31vr3i2");
private Control panelInstance; private Control panelInstance;
public override void _EnterTree() public override void _EnterTree()

View file

@ -1,9 +1,9 @@
[gd_scene load_steps=5 format=3 uid="uid://dkq82o31vr3i2"] [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://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://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"] [node name="AdventureEditor" type="MarginContainer"]
anchors_preset = 15 anchors_preset = 15
@ -41,6 +41,11 @@ script = ExtResource("2_d5hwn")
[node name="FileDialog" type="FileDialog" parent="Editor/StatusBar/HBoxContainer/FileButton"] [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"] [node name="WorkArea" type="HSplitContainer" parent="Editor"]
layout_mode = 2 layout_mode = 2
size_flags_vertical = 3 size_flags_vertical = 3
@ -79,6 +84,7 @@ text = "New"
[connection signal="HardReloadRequested" from="." to="Editor/WorkArea/PanelContainer" method="ClearChildren"] [connection signal="HardReloadRequested" from="." to="Editor/WorkArea/PanelContainer" method="ClearChildren"]
[connection signal="ResourceChanged" from="." to="Editor/WorkArea/Inspector/ResourceInspector" method="Refresh"] [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="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="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"] [connection signal="item_edited" from="Editor/WorkArea/Inspector/ResourceInspector/Tree" to="Editor/WorkArea/Inspector/ResourceInspector" method="OnItemEdited"]

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://sqessjn0m4o3"] [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"] [ext_resource type="Script" uid="uid://cumeahjpjgagq" path="res://addons/pvzadventure/scripts/InitialEditor.cs" id="1_tu7vy"]
[node name="InitialEditor" type="ScrollContainer"] [node name="InitialEditor" type="ScrollContainer"]

View file

@ -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

View file

@ -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")

View file

@ -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"]

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://iwnklc62rni8"] [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"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jbknv"]
bg_color = Color(0.18359, 0.18359, 0.18359, 1) bg_color = Color(0.18359, 0.18359, 0.18359, 1)

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://segxys6udhyw"] [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"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jbknv"]
bg_color = Color(0.18359, 0.18359, 0.18359, 1) bg_color = Color(0.18359, 0.18359, 0.18359, 1)

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://buvnw8a7pku78"] [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"] [node name="RowEditor" type="VBoxContainer"]
anchors_preset = 15 anchors_preset = 15

View file

@ -1,8 +1,8 @@
[gd_scene load_steps=10 format=3 uid="uid://db5ah76l43ng2"] [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://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/ZombieEditor.cs" id="1_thd7y"] [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/ZE_GridContainer.cs" id="2_13ic4"] [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"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_thd7y"]
bg_color = Color(0.430693, 0.742747, 0.314214, 1) bg_color = Color(0.430693, 0.742747, 0.314214, 1)

View file

@ -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);
}
}

View file

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

View file

@ -0,0 +1,5 @@
public abstract partial class BaseWaveEditor : BaseEditor
{
public WaveData editedWave;
public abstract void SetEditedWave(WaveData wave);
}

View file

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

View file

@ -1,10 +1,8 @@
using Godot; using Godot;
[Tool] [Tool]
public partial class InitialEditor : Node public partial class InitialEditor : BaseEditor
{ {
public AdventureLevelResource editedResource;
[Signal] public delegate void SaveCallbackEventHandler();
public override void _Ready() public override void _Ready()
{ {
foreach (var child in GetChild(0).GetChildren()) 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; editedResource = resource;
for (int i = 0; i < GetChild(0).GetChildCount(); i++) for (int i = 0; i < GetChild(0).GetChildCount(); i++)

View file

@ -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);
}
}

View file

@ -55,11 +55,22 @@ public partial class AdventureEditor : MarginContainer
HardReload(); HardReload();
} }
} }
public override void _ExitTree() public void Play()
{ {
EditorInterface.Singleton.GetInspector().PropertyEdited -= OnInspectorPropertyChanged; 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; EditorInterface.Singleton.GetInspector().EditedObjectChanged -= OnResourceChanged;
} }
} }
#endif #endif

View file

@ -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<PackedScene>(tilesetUID), ResourceLoader.Load<AdventureLevelResource>(pathToLevel));
}
}

View file

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

View file

@ -11,8 +11,10 @@ public partial class AdventureResourceInspector : Node
const string ZOMBIES_ITEM_NAME = "Zombies"; const string ZOMBIES_ITEM_NAME = "Zombies";
const string EVENTS_ITEM_NAME = "Events"; const string EVENTS_ITEM_NAME = "Events";
const string HUGEWAVE_ITEM_NAME = "Is huge wave?"; const string HUGEWAVE_ITEM_NAME = "Is huge wave?";
const string SEEDPACKETS_ITEM_NAME = "Seedpackets editor";
private PackedScene zombieEditorScene = ResourceLoader.Load<PackedScene>("uid://db5ah76l43ng2"); private PackedScene zombieEditorScene = ResourceLoader.Load<PackedScene>("uid://db5ah76l43ng2");
private PackedScene initialEditorScene = ResourceLoader.Load<PackedScene>("uid://sqessjn0m4o3"); private PackedScene initialEditorScene = ResourceLoader.Load<PackedScene>("uid://sqessjn0m4o3");
private PackedScene seedpacketEditorScene = ResourceLoader.Load<PackedScene>("uid://drc0o8du38apr");
private Tree tree; private Tree tree;
private AdventureLevelResource heldResource; private AdventureLevelResource heldResource;
@ -28,6 +30,7 @@ public partial class AdventureResourceInspector : Node
private TreeItem root; private TreeItem root;
private TreeItem initialData; private TreeItem initialData;
private TreeItem seedpacketData;
public override void _Ready() public override void _Ready()
{ {
@ -48,6 +51,7 @@ public partial class AdventureResourceInspector : Node
root = CreateItem(LEVEL_ITEM_NAME); root = CreateItem(LEVEL_ITEM_NAME);
initialData = CreateItem(INITIAL_ITEM_NAME, root); initialData = CreateItem(INITIAL_ITEM_NAME, root);
seedpacketData = CreateItem(SEEDPACKETS_ITEM_NAME, root);
for (int i = 0; i < heldResource.waves.Count; i++) for (int i = 0; i < heldResource.waves.Count; i++)
{ {
@ -58,7 +62,7 @@ public partial class AdventureResourceInspector : Node
CreateItem(EVENTS_ITEM_NAME, wave); CreateItem(EVENTS_ITEM_NAME, wave);
CreateItem(HUGEWAVE_ITEM_NAME, TreeItem.TreeCellMode.Check, true, wave) CreateItem(HUGEWAVE_ITEM_NAME, TreeItem.TreeCellMode.Check, true, wave)
.SetChecked(0, heldResource.waves[i].isHugeWave); .SetChecked(0, heldResource.waves[i].isHugeWave);
var delay = tree.CreateItem(wave); var delay = tree.CreateItem(wave);
if (heldResource.waves[i].customWaveDelay > 0) if (heldResource.waves[i].customWaveDelay > 0)
@ -94,8 +98,7 @@ public partial class AdventureResourceInspector : Node
var editor = zombieEditorScene.Instantiate<ZombieEditor>(); var editor = zombieEditorScene.Instantiate<ZombieEditor>();
editorContainer.AddChild(editor); editorContainer.AddChild(editor);
editor.SetEditedWave(heldResource.waves[GetWaveIndex(selected.GetParent())]); SetupWaveEditor(editor, heldResource.waves[GetWaveIndex(selected.GetParent())]);
editor.SaveCallback += adventureEditor.Save;
return; return;
case EVENTS_ITEM_NAME: case EVENTS_ITEM_NAME:
@ -103,9 +106,14 @@ public partial class AdventureResourceInspector : Node
case INITIAL_ITEM_NAME: case INITIAL_ITEM_NAME:
var initialEditor = initialEditorScene.Instantiate<InitialEditor>(); var initialEditor = initialEditorScene.Instantiate<InitialEditor>();
editorContainer.AddChild(initialEditor); editorContainer.AddChild(initialEditor);
initialEditor.SetData(heldResource); SetupEditor(initialEditor);
initialEditor.SaveCallback += adventureEditor.Save;
break; break;
case SEEDPACKETS_ITEM_NAME:
var seedpacketEditor = seedpacketEditorScene.Instantiate<SeedpacketEditor>();
editorContainer.AddChild(seedpacketEditor);
SetupEditor(seedpacketEditor);
break;
} }
} }
@ -145,17 +153,37 @@ public partial class AdventureResourceInspector : Node
} }
private TreeItem CreateItem(string Name, TreeItem root = null) private TreeItem CreateItem(string Name, TreeItem root = null)
{ {
var item = tree.CreateItem(root); if (root == null)
item.SetText(0, Name); {
return item; 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) private TreeItem CreateItem(string Name, TreeItem.TreeCellMode cellMode, bool editable, TreeItem root = null)
{ {
var item = tree.CreateItem(root); var item = tree.CreateItem(root);
item.SetCellMode(0,cellMode); item.SetCellMode(0, cellMode);
item.SetEditable(0, editable); item.SetEditable(0, editable);
item.SetText(0, Name); item.SetText(0, Name);
return item; 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 #endif

View file

@ -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<string>()[0]) is PlantResource;
}
}
return false;
}
public override void _DropData(Vector2 atPosition, Variant data)
{
HeldResource = ResourceLoader.Load(data.AsGodotDictionary()["files"].AsGodotArray<string>()[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;
}
}
}

View file

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

View file

@ -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;
}
}

View file

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

View file

@ -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<PackedScene>("uid://dymyownbt688c");
for (int i = 0; i < plants.Count; i++)
{
var seedpacket = packed.Instantiate<ForbiddableSeedpacket>();
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<string> 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<string> 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<PlantResource>(PLANTS_DIRECTORY + file);
}
return null;
}
private List<PlantResource> GetPlants()
{
var result = new List<PlantResource>();
foreach (var file in ResourceLoader.ListDirectory(PLANTS_DIRECTORY))
{
result.Add(ResourceLoader.Load<PlantResource>(PLANTS_DIRECTORY + file));
}
result.Sort((a, b) =>
{
return a.Order - b.Order;
});
return result;
}
}

View file

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

View file

@ -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);
}
}

Binary file not shown.

View file

@ -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

Binary file not shown.

View file

@ -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

View file

@ -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] [resource]
script = ExtResource("1_rfumy") script = ExtResource("1_rfumy")
Duration = 1.0 tilesWalked = 0.2
Duration = 3.0
Slot = "garlic" Slot = "garlic"

View file

@ -1,8 +1,9 @@
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://dme4nvp28otq6"] [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] [resource]
script = ExtResource("1_bd12u") script = ExtResource("1_bd12u")
tilesWalked = 0.2
Duration = 0.25 Duration = 0.25
Slot = "garlic" Slot = "garlic"

View file

@ -131,6 +131,8 @@ wavePercentage = 0.5
standardWaveDelay = 30.0 standardWaveDelay = 30.0
initialWaveDelay = 20.0 initialWaveDelay = 20.0
reward = ExtResource("1_pd3l1") reward = ExtResource("1_pd3l1")
forbiddenPlants = [] forbiddenPlants = Array[String](["peashooter", "threepeater"])
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")] 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]) 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])

View file

@ -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])

View file

@ -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="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="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://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://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"] [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 standardWaveDelay = 30.0
initialWaveDelay = 20.0 initialWaveDelay = 20.0
reward = ExtResource("1_eqa0o") reward = ExtResource("1_eqa0o")
forbiddenPlants = Array[String](["aloe", "spikeweed", "peashooter", "wallnut"]) forbiddenPlants = Array[String](["garlic", "nerdus"])
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")] forbiddenTags = Array[String]([])
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]) 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" metadata/_custom_type_script = "uid://bximdujbkj2n4"

View file

@ -38,5 +38,8 @@ wavePercentage = 0.0
standardWaveDelay = 20.0 standardWaveDelay = 20.0
initialWaveDelay = 10.0 initialWaveDelay = 10.0
reward = ExtResource("1_sw8bw") 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]) 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])

View file

@ -13,6 +13,6 @@ DescriptionKey = "garlic_desc"
Cost = 50.0 Cost = 50.0
Scene = ExtResource("2_81n0p") Scene = ExtResource("2_81n0p")
ReloadTime = 7.5 ReloadTime = 7.5
ReloadProgress = 0.67 ReloadProgress = 0.0
Preview = ExtResource("1_datic") Preview = ExtResource("1_datic")
Order = 7 Order = 7

View file

@ -13,6 +13,6 @@ DescriptionKey = "potatomine_desc"
Cost = 25.0 Cost = 25.0
Scene = ExtResource("2_ig2ti") Scene = ExtResource("2_ig2ti")
ReloadTime = 25.0 ReloadTime = 25.0
ReloadProgress = 0.9 ReloadProgress = 0.0
Preview = ExtResource("1_xk2pg") Preview = ExtResource("1_xk2pg")
Order = 3 Order = 3

View file

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Before After
Before After

View file

@ -196,11 +196,10 @@ cursor_right={
[internationalization] [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/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] [layer_names]
2d_physics/layer_1="Reserved" 2d_physics/layer_1="Structures"
2d_physics/layer_2="Plants Dummy" 2d_physics/layer_2="Plants Dummy"
2d_physics/layer_3="Plants True" 2d_physics/layer_3="Plants True"
2d_physics/layer_4="Zombies Dummy" 2d_physics/layer_4="Zombies Dummy"
@ -208,6 +207,7 @@ locale/test="en"
2d_physics/layer_6="Projectiles" 2d_physics/layer_6="Projectiles"
2d_physics/layer_7="FallLine" 2d_physics/layer_7="FallLine"
2d_physics/layer_8="FallParticles" 2d_physics/layer_8="FallParticles"
2d_physics/layer_9="Tiles"
[rendering] [rendering]

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -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"]

View file

@ -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="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://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://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="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="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="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="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://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="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="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"] [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://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="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="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://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="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"] [sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_wn68q"]
resource_local_to_scene = true tip_nodepath = NodePath("Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand")
shader = ExtResource("23_nc6p3") ccdik_data_chain_length = 2
shader_parameter/FLASH_COLOR = Color(1, 0.709804, 0.439216, 0.5) joint_data/0/bone_index = 17
shader_parameter/HIGHLIGHT_COLOR = Color(1, 0.709804, 0.439216, 0.5) joint_data/0/bone2d_node = NodePath("Butt/Body/LeftUpperArm/LeftLowerArm")
shader_parameter/blend = 0.0 joint_data/0/rotate_from_joint = false
shader_parameter/selected = 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"] [sub_resource type="AtlasTexture" id="AtlasTexture_txjqc"]
atlas = ExtResource("5_b583s") atlas = ExtResource("5_b583s")
@ -74,6 +173,10 @@ region = Rect2(91, 32, 9, 15)
atlas = ExtResource("5_b583s") atlas = ExtResource("5_b583s")
region = Rect2(137, 19, 29, 39) 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"] [sub_resource type="AtlasTexture" id="AtlasTexture_5selg"]
atlas = ExtResource("5_b583s") atlas = ExtResource("5_b583s")
region = Rect2(0, 29, 35, 11) region = Rect2(0, 29, 35, 11)
@ -82,20 +185,30 @@ region = Rect2(0, 29, 35, 11)
radius = 17.0 radius = 17.0
height = 48.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"] [sub_resource type="AtlasTexture" id="AtlasTexture_n380g"]
atlas = ExtResource("5_b583s") atlas = ExtResource("5_b583s")
region = Rect2(34, 38, 45, 27) region = Rect2(34, 38, 45, 27)
[sub_resource type="CircleShape2D" id="CircleShape2D_vn3j1"] [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"] [sub_resource type="AtlasTexture" id="AtlasTexture_tebih"]
atlas = ExtResource("5_b583s") atlas = ExtResource("5_b583s")
region = Rect2(34, 0, 6, 19) region = Rect2(34, 0, 6, 19)
@ -108,6 +221,10 @@ region = Rect2(43, 0, 9, 15)
atlas = ExtResource("5_b583s") atlas = ExtResource("5_b583s")
region = Rect2(55, 0, 9, 10) 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"] [sub_resource type="Animation" id="Animation_vn3j1"]
resource_name = "RESET" resource_name = "RESET"
tracks/0/type = "value" tracks/0/type = "value"
@ -656,6 +773,9 @@ _data = {
&"RESET": SubResource("Animation_vn3j1") &"RESET": SubResource("Animation_vn3j1")
} }
[sub_resource type="RectangleShape2D" id="RectangleShape2D_hxyad"]
size = Vector2(26, 48)
[sub_resource type="Resource" id="Resource_n380g"] [sub_resource type="Resource" id="Resource_n380g"]
resource_local_to_scene = true resource_local_to_scene = true
script = ExtResource("4_c1y3b") script = ExtResource("4_c1y3b")
@ -663,6 +783,9 @@ flat_value = 5.0
percentage_value = 0.0 percentage_value = 0.0
mult_value = 1.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="AnimationNodeTimeScale" id="AnimationNodeTimeScale_2q05d"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_vn3j1"] [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_vn3j1"]
@ -757,85 +880,206 @@ flat_value = 0.4
percentage_value = 0.0 percentage_value = 0.0
mult_value = 1.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") _armor = NodePath("CanArmor")
MaxHP = 185.0 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"] [node name="CanvasGroup" type="CanvasGroup" parent="."]
material = SubResource("ShaderMaterial_vn3j1") 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) 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") 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"] [node name="RightUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"]
scale = Vector2(0.999831, 0.999831) use_parent_material = true
position = Vector2(-6, 3)
[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"]
scale = Vector2(0.99983, 0.99983) 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") 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"] [node name="LeftLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg"]
scale = Vector2(0.999832, 0.999832) position = Vector2(-1, 13)
[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"]
scale = Vector2(0.999827, 0.999827) 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") 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"] [node name="RightLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"]
scale = Vector2(0.999815, 0.999815) 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") 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") 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") 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"] [node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"]
rotation = 0.0332545 position = Vector2(-9, -21)
rotation = 0.00541537
scale = Vector2(1e-05, 1e-05) 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 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) scale = Vector2(1.00027, 1.00027)
collision_layer = 128 collision_layer = 128
collision_mask = 64 collision_mask = 64
@ -847,7 +1091,7 @@ minTorque = -45.0
maxTorque = 45.0 maxTorque = 45.0
Impulse = 100.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") material = ExtResource("6_vn3j1")
position = Vector2(-5.9999, -4.5002) position = Vector2(-5.9999, -4.5002)
texture = ExtResource("6_i6nje") texture = ExtResource("6_i6nje")
@ -856,43 +1100,42 @@ armor = NodePath("../../../../../../../CanArmor")
degradationStages = Array[Texture2D]([ExtResource("6_i6nje"), ExtResource("7_txjqc"), ExtResource("8_b583s")]) degradationStages = Array[Texture2D]([ExtResource("6_i6nje"), ExtResource("7_txjqc"), ExtResource("8_b583s")])
thresholdPercentage = Array[float]([1.0, 0.667, 0.333]) 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"] [node name="Sprite2D2" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Can"]
z_index = -1
material = ExtResource("6_vn3j1") material = ExtResource("6_vn3j1")
position = Vector2(-7.4999, -27.5002) position = Vector2(-7.4999, -27.5002)
texture = SubResource("AtlasTexture_5selg") 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) position = Vector2(-4.9999, -5.0002)
shape = SubResource("CapsuleShape2D_4248q") shape = SubResource("CapsuleShape2D_4248q")
[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle" index="0"] [node name="Head" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"]
texture = SubResource("AtlasTexture_pjhfy") 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"] [node name="HeadParticle" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" node_paths=PackedStringArray("data")]
position = Vector2(-16, -8.00001) 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"] [node name="TrashcanLid" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle" node_paths=PackedStringArray("data")]
position = Vector2(-4, -9) position = Vector2(-3, 3.00001)
[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)
scale = Vector2(0.999826, 0.999826) scale = Vector2(0.999826, 0.999826)
collision_layer = 128 collision_layer = 128
collision_mask = 64 collision_mask = 64
freeze = true freeze = true
script = ExtResource("3_tu6af") 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"] [node name="Trashcan_lid" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/TrashcanLid"]
z_index = -1
material = ExtResource("6_vn3j1") material = ExtResource("6_vn3j1")
position = Vector2(2.99822, -20.0166) position = Vector2(2.99822, -20.0166)
scale = Vector2(1, 1) scale = Vector2(1, 1)
@ -900,19 +1143,90 @@ texture = SubResource("AtlasTexture_n380g")
offset = Vector2(-0.5, -0.5) offset = Vector2(-0.5, -0.5)
metadata/_edit_lock_ = true 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) position = Vector2(2.99791, -20.018)
shape = SubResource("CircleShape2D_vn3j1") 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") script = ExtResource("12_vn3j1")
_threshold = 0.333 _threshold = 0.333
_observedArmor = NodePath("../../../../../../../../../../CanArmor") _observedArmor = NodePath("../../../../../../../../../CanArmor")
[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] [node name="Head" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle"]
scale = Vector2(0.999834, 0.999834) 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) position = Vector2(-0.0022974, -17.0131)
scale = Vector2(0.999828, 0.999828) scale = Vector2(0.999828, 0.999828)
rest = Transform2D(1, 0, 0, 1, -0.0022974, -17.0131) rest = Transform2D(1, 0, 0, 1, -0.0022974, -17.0131)
@ -921,84 +1235,195 @@ length = 12.0
bone_angle = 180.0 bone_angle = 180.0
editor_settings/show_bone_gizmo = false editor_settings/show_bone_gizmo = false
[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/TrashcanLid" index="0"] [node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/TrashcanLid"]
remote_path = NodePath("../../HeadParticle/Head/TrashcanLid/Trashcan_lid") remote_path = NodePath("../../HeadParticle/TrashcanLid/Trashcan_lid")
[node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="5"] [node name="LeftUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"]
scale = Vector2(0.999825, 0.999825) 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") 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"] [node name="HandProjectile" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" node_paths=PackedStringArray("data")]
rotation = 0.0299982 position = Vector2(-2, 14)
scale = Vector2(0.999995, 0.999995) 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") 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) position = Vector2(-0.99983, 12.9978)
rotation = 0.0
scale = Vector2(0.999652, 0.999652) scale = Vector2(0.999652, 0.999652)
texture = SubResource("AtlasTexture_dntsa") 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"] [node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"]
scale = Vector2(0.999825, 0.999825) 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) 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 = { libraries = {
&"": SubResource("AnimationLibrary_x5uj2"), &"": SubResource("AnimationLibrary_x5uj2"),
&"basic": ExtResource("7_vn3j1"), &"basic": ExtResource("7_vn3j1"),
&"hobo": ExtResource("8_yb81c") &"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" 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") _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") tree_root = SubResource("AnimationNodeBlendTree_txjqc")
advance_expression_base_node = NodePath("../Behaviour") 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") _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")]) playlist = Array[AudioStream]([ExtResource("8_4248q"), ExtResource("9_tu6af")])
channels = Array[String](["metal_hit", "hit"]) 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") script = ExtResource("4_w8pya")
MaxHP = 550.0 MaxHP = 550.0
metadata/_custom_type_script = "uid://fd4im1fmwc5n" 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") script = ExtResource("19_8y6c0")
shaderMaterial = ExtResource("6_vn3j1") 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") script = ExtResource("4_5selg")
_eatBox = NodePath("../Eatbox") _eatBox = NodePath("../Eatbox")
_animationTree = NodePath("../AnimationTree") _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") script = ExtResource("11_7jlle")
audioStream = ExtResource("12_w1b1s") audioStream = ExtResource("12_w1b1s")
channel = "anger" channel = "anger"
metadata/_custom_type_script = "uid://c36bj8u7jghc7" 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") 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="HasBeenKilled" from="." to="DeathHandler" method="OnKilled"]
[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="OnDamaged" from="." to="HitPlayer" method="Play"]
[connection signal="ArmorLost" from="CanArmor" to="HitPlayer" method="Next"] [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="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="ArmorLost" from="CanArmor" to="Behaviour" method="Trashed"]
[connection signal="Damaged" from="CanArmor" to="HitPlayer" method="Play"] [connection signal="Damaged" from="CanArmor" to="HitPlayer" method="Play"]
[connection signal="Damaged" from="CanArmor" to="CanArmor/FlashController" method="DamageFlash"] [connection signal="Damaged" from="CanArmor" to="CanArmor/FlashController" method="DamageFlash"]

View file

@ -827,13 +827,13 @@ metadata/_edit_lock_ = true
[node name="RightLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg"] [node name="RightLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg"]
position = Vector2(-2, 12) position = Vector2(-2, 12)
scale = Vector2(0.999835, 0.999835) scale = Vector2(0.999832, 0.999832)
rest = Transform2D(1, 0, 0, 1, -2, 12) rest = Transform2D(1, 0, 0, 1, -2, 12)
editor_settings/show_bone_gizmo = false editor_settings/show_bone_gizmo = false
[node name="RightFoot" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg"] [node name="RightFoot" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg"]
position = Vector2(-2, 14) position = Vector2(-2, 14)
scale = Vector2(0.999833, 0.999833) scale = Vector2(0.999831, 0.999831)
rest = Transform2D(1, 0, 0, 1, -2, 14) rest = Transform2D(1, 0, 0, 1, -2, 14)
auto_calculate_length_and_angle = false auto_calculate_length_and_angle = false
length = 12.0 length = 12.0
@ -868,7 +868,7 @@ metadata/_edit_lock_ = true
[node name="LeftLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg"] [node name="LeftLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg"]
position = Vector2(-1, 13) position = Vector2(-1, 13)
scale = Vector2(0.999834, 0.999834) scale = Vector2(0.999832, 0.999832)
rest = Transform2D(1, 0, 0, 1, -1, 13) rest = Transform2D(1, 0, 0, 1, -1, 13)
editor_settings/show_bone_gizmo = false 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"] [node name="LeftFoot" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg"]
position = Vector2(6, 10) position = Vector2(6, 10)
scale = Vector2(0.999831, 0.999831) scale = Vector2(0.99983, 0.99983)
rest = Transform2D(1, 0, 0, 1, 6, 10) rest = Transform2D(1, 0, 0, 1, 6, 10)
auto_calculate_length_and_angle = false auto_calculate_length_and_angle = false
length = 12.0 length = 12.0
@ -896,15 +896,14 @@ metadata/_edit_lock_ = true
[node name="Body" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] [node name="Body" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"]
use_parent_material = true use_parent_material = true
position = Vector2(1, -2) position = Vector2(1, -2)
scale = Vector2(0.999828, 0.999828) scale = Vector2(0.999827, 0.999827)
rest = Transform2D(1, 0, 0, 1, 1, -2) rest = Transform2D(1, 0, 0, 1, 1, -2)
editor_settings/show_bone_gizmo = false editor_settings/show_bone_gizmo = false
[node name="RightUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] [node name="RightUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"]
z_index = -1
use_parent_material = true use_parent_material = true
position = Vector2(-14, -23) position = Vector2(-14, -23)
scale = Vector2(0.999828, 0.999828) scale = Vector2(0.999829, 0.999829)
rest = Transform2D(1, 0, 0, 1, -14, -23) rest = Transform2D(1, 0, 0, 1, -14, -23)
editor_settings/show_bone_gizmo = false 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"] [node name="RightLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"]
position = Vector2(-2, 15) position = Vector2(-2, 15)
scale = Vector2(0.999829, 0.999829) scale = Vector2(0.999827, 0.999827)
rest = Transform2D(1, 0, 0, 1, -2, 15) rest = Transform2D(1, 0, 0, 1, -2, 15)
editor_settings/show_bone_gizmo = false editor_settings/show_bone_gizmo = false
[node name="RightHand" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm"] [node name="RightHand" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm"]
position = Vector2(-1, 13) position = Vector2(-1, 13)
scale = Vector2(0.999828, 0.999828) scale = Vector2(0.99983, 0.99983)
rest = Transform2D(1, 0, 0, 1, -1, 13) rest = Transform2D(1, 0, 0, 1, -1, 13)
auto_calculate_length_and_angle = false auto_calculate_length_and_angle = false
length = 8.0 length = 8.0
@ -950,8 +949,8 @@ metadata/_edit_lock_ = true
[node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] [node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"]
position = Vector2(-9, -21) position = Vector2(-9, -21)
rotation = 0.0871529 rotation = -0.0127525
skew = -0.000476122 skew = -0.000478387
rest = Transform2D(1, 0, 0, 1, -9, -21) rest = Transform2D(1, 0, 0, 1, -9, -21)
auto_calculate_length_and_angle = false auto_calculate_length_and_angle = false
length = 24.0 length = 24.0
@ -988,25 +987,23 @@ offset = Vector2(-20, -24)
metadata/_edit_lock_ = true metadata/_edit_lock_ = true
[node name="Right_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"] [node name="Right_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"]
position = Vector2(-16, -8) position = Vector2(-16, -8.00001)
scale = Vector2(1, 1)
texture = SubResource("AtlasTexture_vcc72") texture = SubResource("AtlasTexture_vcc72")
centered = false centered = false
offset = Vector2(-2, -2) offset = Vector2(-2, -2)
metadata/_edit_lock_ = true metadata/_edit_lock_ = true
[node name="Left_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"] [node name="Left_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"]
position = Vector2(-4, -9) position = Vector2(-4, -9.00001)
scale = Vector2(1, 1)
texture = SubResource("AtlasTexture_kto0i") texture = SubResource("AtlasTexture_kto0i")
centered = false centered = false
offset = Vector2(-2, -2) offset = Vector2(-2, -2)
metadata/_edit_lock_ = true metadata/_edit_lock_ = true
[node name="Jaw" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"] [node name="Jaw" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"]
position = Vector2(-3.00107, 2.99818) position = Vector2(-2.98416, 2.96178)
rotation = 0.00845789 rotation = -0.0089077
scale = Vector2(0.999829, 0.999829) scale = Vector2(0.999826, 0.999826)
texture = SubResource("AtlasTexture_x5uj2") texture = SubResource("AtlasTexture_x5uj2")
centered = false centered = false
offset = Vector2(-12, -2) offset = Vector2(-12, -2)
@ -1023,7 +1020,7 @@ _observedEntity = NodePath("../../../../../../../..")
[node name="Jaw" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] [node name="Jaw" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"]
position = Vector2(-3, 3) position = Vector2(-3, 3)
scale = Vector2(0.99983, 0.99983) scale = Vector2(0.999826, 0.999826)
rest = Transform2D(1, 0, 0, 1, -3, 3) rest = Transform2D(1, 0, 0, 1, -3, 3)
auto_calculate_length_and_angle = false auto_calculate_length_and_angle = false
length = 11.0 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"] [node name="LeftUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"]
position = Vector2(-1, -20) position = Vector2(-1, -20)
scale = Vector2(0.999831, 0.999831) scale = Vector2(0.99983, 0.99983)
rest = Transform2D(1, 0, 0, 1, -1, -20) rest = Transform2D(1, 0, 0, 1, -1, -20)
editor_settings/show_bone_gizmo = false editor_settings/show_bone_gizmo = false
@ -1079,8 +1076,8 @@ minTorque = -45.0
maxTorque = 45.0 maxTorque = 45.0
[node name="Left_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"] [node name="Left_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"]
rotation = 0.0819429 rotation = -0.0135165
scale = Vector2(0.999998, 0.999998) scale = Vector2(0.999999, 0.999999)
texture = SubResource("AtlasTexture_auqeq") texture = SubResource("AtlasTexture_auqeq")
centered = false centered = false
offset = Vector2(-5, 0) 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"] [node name="Left_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm"]
show_behind_parent = true show_behind_parent = true
position = Vector2(-0.99983, 12.9978) position = Vector2(-0.99983, 12.9978)
rotation = -0.0361645 rotation = -0.0111417
scale = Vector2(0.999656, 0.999656) scale = Vector2(0.99966, 0.99966)
texture = SubResource("AtlasTexture_vlvtp") texture = SubResource("AtlasTexture_vlvtp")
centered = false centered = false
offset = Vector2(-4, -1) offset = Vector2(-4, -1)
@ -1106,13 +1103,13 @@ _observedEntity = NodePath("../../../../../../../..")
[node name="LeftLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm"] [node name="LeftLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm"]
position = Vector2(-2, 14) position = Vector2(-2, 14)
scale = Vector2(0.999828, 0.999828) scale = Vector2(0.999829, 0.999829)
rest = Transform2D(1, 0, 0, 1, -2, 14) rest = Transform2D(1, 0, 0, 1, -2, 14)
editor_settings/show_bone_gizmo = false editor_settings/show_bone_gizmo = false
[node name="LeftHand" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm"] [node name="LeftHand" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm"]
position = Vector2(-1, 13) position = Vector2(-1, 13)
scale = Vector2(0.999826, 0.999826) scale = Vector2(0.999829, 0.999829)
rest = Transform2D(1, 0, 0, 1, -1, 13) rest = Transform2D(1, 0, 0, 1, -1, 13)
auto_calculate_length_and_angle = false auto_calculate_length_and_angle = false
length = 6.0 length = 6.0
@ -1167,7 +1164,6 @@ entity = NodePath("..")
[node name="Mover" type="Node" parent="."] [node name="Mover" type="Node" parent="."]
script = ExtResource("4_u5syx") script = ExtResource("4_u5syx")
_speed = SubResource("Resource_ckb7n") _speed = SubResource("Resource_ckb7n")
_speedControlMult = 0.271112
[node name="HitPlayer" type="Node" parent="."] [node name="HitPlayer" type="Node" parent="."]
script = ExtResource("12_he8da") script = ExtResource("12_he8da")

View file

@ -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="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_8fr1j"]
[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_dm0tl"] [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="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="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://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"] [ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="5_gfy6j"]
[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="7_vpcbp"]
[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
[sub_resource type="Animation" id="Animation_vknky"] [sub_resource type="Animation" id="Animation_vknky"]
length = 0.001 length = 0.001
@ -103,43 +97,54 @@ node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_oe0dc"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_oe0dc"]
size = Vector2(22, 32) size = Vector2(22, 32)
[node name="Aloe" instance=ExtResource("1_n25yi")] [node name="Aloe" type="Node2D" node_paths=PackedStringArray("_player", "_tree")]
internal_id = "aloe" script = ExtResource("1_8fr1j")
MaxHP = 30.0 MaxHP = 30.0
_player = NodePath("AnimationPlayer")
_tree = NodePath("AnimationTree")
[node name="Sprite2D" parent="." index="0"] [node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("ShaderMaterial_8fr1j") material = ExtResource("2_aimqk")
position = Vector2(9, -14) position = Vector2(9, -14)
texture = ExtResource("2_iup5p") texture = ExtResource("2_iup5p")
hframes = 8 hframes = 8
vframes = 4 vframes = 4
[node name="AnimationPlayer" parent="." index="1"] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = { libraries = {
&"": SubResource("AnimationLibrary_wlien"), &"": SubResource("AnimationLibrary_wlien"),
&"aloe": ExtResource("3_3sp3b") &"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") tree_root = SubResource("AnimationNodeBlendTree_gfy6j")
anim_player = NodePath("../AnimationPlayer")
parameters/TimeScale/scale = 1.0 parameters/TimeScale/scale = 1.0
parameters/Tree/conditions/charged = false parameters/Tree/conditions/charged = false
parameters/Tree/conditions/heal = 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") script = ExtResource("4_55asm")
_hpTreshold = 0.5 _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 wait_time = 15.0
one_shot = true one_shot = true
script = ExtResource("5_gfy6j") script = ExtResource("5_gfy6j")
entity = NodePath("../..") 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") shape = SubResource("RectangleShape2D_oe0dc")
[node name="FlashController" parent="." index="5"] [node name="FlashController" type="Node" parent="."]
shaderMaterial = SubResource("ShaderMaterial_8fr1j") 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"] [connection signal="timeout" from="Behaviour/Timer" to="Behaviour" method="OnTimeout"]

View file

@ -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="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://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="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://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"] [ext_resource type="Script" uid="uid://bdk5iqtw4xbkl" path="res://scripts/entities/plants/behaviours/PeashooterBehaviour.cs" id="7_q31qc"]
[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="9_a66ro"]
[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
[sub_resource type="Animation" id="Animation_n1xkd"] [sub_resource type="Animation" id="Animation_n1xkd"]
length = 0.001 length = 0.001
@ -118,7 +112,6 @@ transitions = ["Start", "cucumber_idle", SubResource("AnimationNodeStateMachineT
graph_offset = Vector2(137, -3) graph_offset = Vector2(137, -3)
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_xwpd6"] [sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_xwpd6"]
graph_offset = Vector2(-370, 72)
nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_ig0op") nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_ig0op")
nodes/TimeScale/position = Vector2(60, 140) nodes/TimeScale/position = Vector2(60, 140)
nodes/Tree/node = SubResource("AnimationNodeStateMachine_jbggv") nodes/Tree/node = SubResource("AnimationNodeStateMachine_jbggv")
@ -132,54 +125,67 @@ height = 48.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_n1xkd"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_n1xkd"]
size = Vector2(26, 600) size = Vector2(26, 600)
[node name="Cucumber" instance=ExtResource("1_65f4u")] [node name="Cucumber" type="Node2D" node_paths=PackedStringArray("_player", "_tree")]
internal_id = "cucumber" material = ExtResource("2_q31qc")
script = ExtResource("1_xwpd6")
MaxHP = 30.0 MaxHP = 30.0
_player = NodePath("AnimationPlayer")
_tree = NodePath("AnimationTree")
[node name="Sprite2D" parent="." index="0"] [node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("ShaderMaterial_jbggv") material = ExtResource("2_q31qc")
texture = ExtResource("2_ig0op") texture = ExtResource("2_ig0op")
hframes = 10 hframes = 10
vframes = 2 vframes = 2
frame = 10 frame = 10
[node name="AnimationPlayer" parent="." index="1"] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = { libraries = {
&"": SubResource("AnimationLibrary_gogcg"), &"": SubResource("AnimationLibrary_gogcg"),
&"cucumber": SubResource("AnimationLibrary_n1xkd") &"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") tree_root = SubResource("AnimationNodeBlendTree_xwpd6")
anim_player = NodePath("../AnimationPlayer")
parameters/TimeScale/scale = 1.0 parameters/TimeScale/scale = 1.0
parameters/Tree/conditions/ready = false 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") shape = SubResource("CapsuleShape2D_ig0op")
[node name="Eysight" type="Area2D" parent="." index="4"] [node name="Eysight" type="Area2D" parent="."]
collision_layer = 4 collision_layer = 4
collision_mask = 8 collision_mask = 8
script = ExtResource("3_d45iq") script = ExtResource("3_d45iq")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Eysight" index="0"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Eysight"]
shape = SubResource("RectangleShape2D_n1xkd") 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") script = ExtResource("4_sckvu")
_projectile = ExtResource("5_sckvu") _projectile = ExtResource("5_sckvu")
_timer = NodePath("FireTimer") _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 wait_time = 2.5
one_shot = true one_shot = true
script = ExtResource("6_xwpd6") script = ExtResource("6_xwpd6")
entity = NodePath("../..") 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") script = ExtResource("7_q31qc")
_shootTimer = NodePath("../Shooter/FireTimer") _shootTimer = NodePath("../Shooter/FireTimer")
_sight = NodePath("../Eysight") _sight = NodePath("../Eysight")
[node name="FlashController" parent="." index="7"] [node name="FlashController" type="Node" parent="."]
shaderMaterial = SubResource("ShaderMaterial_jbggv") script = ExtResource("9_a66ro")
shaderMaterial = ExtResource("2_q31qc")
[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"]

View file

@ -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="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="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://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="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="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"] [sub_resource type="Animation" id="Animation_k0cex"]
length = 0.001 length = 0.001
@ -59,37 +62,52 @@ node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_thlvs"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_thlvs"]
size = Vector2(32, 29) size = Vector2(32, 29)
[node name="Garlic" instance=ExtResource("1_5i0e6")] [node name="Garlic" type="Node2D" node_paths=PackedStringArray("_player", "_tree")]
internal_id = "garlic" script = ExtResource("1_gu3kj")
MaxHP = 200.0 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") texture = ExtResource("2_w2jbi")
hframes = 8 hframes = 8
vframes = 3 vframes = 3
[node name="AnimationPlayer" parent="." index="1"] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = { libraries = {
&"": SubResource("AnimationLibrary_v4l78"), &"": SubResource("AnimationLibrary_v4l78"),
&"garlic": ExtResource("3_jkb3q") &"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") tree_root = SubResource("AnimationNodeBlendTree_2o7sr")
anim_player = NodePath("../AnimationPlayer")
parameters/TimeScale/scale = 1.0 parameters/TimeScale/scale = 1.0
parameters/Tree/blend_position = 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) position = Vector2(1, 11.5)
shape = SubResource("RectangleShape2D_thlvs") shape = SubResource("RectangleShape2D_thlvs")
[node name="Behaviour" type="Node" parent="." index="4"] [node name="Behaviour" type="Node" parent="."]
script = ExtResource("4_bv44h") script = ExtResource("4_bv44h")
parameters = Array[String](["parameters/Tree/blend_position"]) 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") script = ExtResource("5_oob20")
_effectToReturn = ExtResource("6_gho1l") _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="Behaviour" method="OnHPChanged"]
[connection signal="OnHPChanged" from="." to="ReturnEffect" method="OnDamageRecieved"] [connection signal="OnHPChanged" from="." to="ReturnEffect" method="OnDamageRecieved"]

View file

@ -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="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="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="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://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"] [sub_resource type="Animation" id="Animation_ga4vy"]
length = 0.001 length = 0.001
@ -251,46 +254,61 @@ radius = 24.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ga4vy"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_ga4vy"]
size = Vector2(73, 48) size = Vector2(73, 48)
[node name="Nerdus" instance=ExtResource("1_8ui1h")] [node name="Nerdus" type="Node2D" node_paths=PackedStringArray("_player", "_tree")]
internal_id = "nerdus" script = ExtResource("1_o12iv")
MaxHP = 200.0 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") texture = ExtResource("2_614v4")
hframes = 7 hframes = 7
vframes = 6 vframes = 6
[node name="AnimationPlayer" parent="." index="1"] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = { libraries = {
&"": SubResource("AnimationLibrary_o1ggp"), &"": SubResource("AnimationLibrary_o1ggp"),
&"nerdus": SubResource("AnimationLibrary_pddnl") &"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") tree_root = SubResource("AnimationNodeBlendTree_6a4q1")
advance_expression_base_node = NodePath("../Hurtbox") advance_expression_base_node = NodePath("../Hurtbox")
anim_player = NodePath("../AnimationPlayer")
parameters/TimeScale/scale = 1.0 parameters/TimeScale/scale = 1.0
parameters/Tree/Attack/blend_position = 1.0 parameters/Tree/Attack/blend_position = 1.0
parameters/Tree/Idle/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) position = Vector2(0, 3)
shape = SubResource("CircleShape2D_8ui1h") shape = SubResource("CircleShape2D_8ui1h")
[node name="Hurtbox" type="Area2D" parent="." index="4"] [node name="Hurtbox" type="Area2D" parent="."]
collision_layer = 0 collision_layer = 0
collision_mask = 8 collision_mask = 8
script = ExtResource("3_614v4") script = ExtResource("3_614v4")
returnEffect = ExtResource("4_ga4vy") returnEffect = ExtResource("4_ga4vy")
bitesToPeas = 1.6 bitesToPeas = 1.6
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hurtbox" index="0"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Hurtbox"]
position = Vector2(3.5, 3) position = Vector2(3.5, 3)
shape = SubResource("RectangleShape2D_ga4vy") shape = SubResource("RectangleShape2D_ga4vy")
[node name="Behaviour" type="Node" parent="." index="5"] [node name="Behaviour" type="Node" parent="."]
script = ExtResource("5_o1ggp") script = ExtResource("5_o1ggp")
parameters = Array[String](["parameters/Tree/Attack/blend_position", "parameters/Tree/Idle/blend_position"]) 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="Hurtbox" method="OnHPChanged"]
[connection signal="OnHPChanged" from="." to="Behaviour" method="OnHPChanged"] [connection signal="OnHPChanged" from="." to="Behaviour" method="OnHPChanged"]

View file

@ -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="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="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="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="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://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://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://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://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="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"] [ext_resource type="AudioStream" uid="uid://dsv81mvrdg3w3" path="res://assets/audio/sfx/throw_generic.tres" id="10_q58jr"]
[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="14_dmys5"]
[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
[sub_resource type="Animation" id="Animation_a2y0j"] [sub_resource type="Animation" id="Animation_a2y0j"]
length = 0.001 length = 0.001
@ -81,63 +75,75 @@ resource_local_to_scene = true
[sub_resource type="RectangleShape2D" id="RectangleShape2D_r7xnh"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_r7xnh"]
size = Vector2(20, 44) size = Vector2(20, 44)
[node name="Peashooter" instance=ExtResource("1_pyk3o")] [node name="Peashooter" type="Node2D" node_paths=PackedStringArray("_player", "_tree")]
internal_id = "peashooter" script = ExtResource("1_p4cd5")
MaxHP = 30.0 MaxHP = 30.0
_player = NodePath("AnimationPlayer")
_tree = NodePath("AnimationTree")
[node name="Sprite2D" parent="." index="0"] [node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("ShaderMaterial_fp65y") material = ExtResource("2_p4cd5")
texture = ExtResource("2_14qlx") texture = ExtResource("2_14qlx")
hframes = 10 hframes = 10
vframes = 2 vframes = 2
[node name="AnimationPlayer" parent="." index="1"] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = { libraries = {
&"": SubResource("AnimationLibrary_ipp6b"), &"": SubResource("AnimationLibrary_ipp6b"),
&"peashooter": ExtResource("3_8lrhp") &"peashooter": ExtResource("3_8lrhp")
} }
autoplay = "peashooter/idle" autoplay = "peashooter/idle"
[node name="AnimationTree" parent="." index="2"] [node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")]
tree_root = SubResource("AnimationNodeBlendTree_q58jr") tree_root = SubResource("AnimationNodeBlendTree_q58jr")
anim_player = NodePath("../AnimationPlayer")
parameters/TimeScale/scale = 1.0 parameters/TimeScale/scale = 1.0
parameters/Tree/conditions/ready = false 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) position = Vector2(12, -4)
script = ExtResource("3_a4ew1") script = ExtResource("3_a4ew1")
_projectile = ExtResource("4_saxds") _projectile = ExtResource("4_saxds")
_timer = NodePath("FireTimer") _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 wait_time = 1.5
one_shot = true one_shot = true
script = ExtResource("6_q58jr") script = ExtResource("6_q58jr")
entity = NodePath("../..") 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") script = ExtResource("5_7qiua")
_shootTimer = NodePath("../Shooter/FireTimer") _shootTimer = NodePath("../Shooter/FireTimer")
_sight = NodePath("../Eysight") _sight = NodePath("../Eysight")
[node name="Eysight" type="Area2D" parent="." index="5"] [node name="Eysight" type="Area2D" parent="."]
collision_layer = 4 collision_layer = 4
collision_mask = 8 collision_mask = 8
script = ExtResource("7_2bki8") script = ExtResource("7_2bki8")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Eysight" index="0"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Eysight"]
shape = SubResource("SegmentShape2D_8iovl") shape = SubResource("SegmentShape2D_8iovl")
script = ExtResource("8_nl4jc") 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) position = Vector2(0, 5)
shape = SubResource("RectangleShape2D_r7xnh") shape = SubResource("RectangleShape2D_r7xnh")
[node name="ChannelPlayer" type="Node" parent="." index="7"] [node name="ChannelPlayer" type="Node" parent="."]
script = ExtResource("9_mbbd7") script = ExtResource("9_mbbd7")
audioStream = ExtResource("10_q58jr") audioStream = ExtResource("10_q58jr")
channel = "pea_shoot" channel = "pea_shoot"
metadata/_custom_type_script = "uid://c36bj8u7jghc7" metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[node name="FlashController" parent="." index="8"] [node name="FlashController" type="Node" parent="."]
shaderMaterial = SubResource("ShaderMaterial_fp65y") script = ExtResource("14_dmys5")
shaderMaterial = ExtResource("2_p4cd5")
[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"]

View file

@ -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="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_a0d1l"]
[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_lx7n5"] [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="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="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="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="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="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="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="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="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"] [ext_resource type="AudioStream" uid="uid://b27om1bw1x04e" path="res://assets/audio/sfx/dirt_rise.mp3" id="9_3vqdc"]
[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="13_cfvur"]
[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
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_3vqdc"] [sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_3vqdc"]
@ -86,85 +80,96 @@ size = Vector2(15, 27)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ti2g4"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_ti2g4"]
size = Vector2(22, 19) size = Vector2(22, 19)
[node name="Potato mine" instance=ExtResource("1_dj7ul")] [node name="Potato mine" type="Node2D" node_paths=PackedStringArray("_player", "_tree")]
internal_id = "potatomine" script = ExtResource("1_a0d1l")
MaxHP = 20.0 MaxHP = 20.0
_player = NodePath("AnimationPlayer")
_tree = NodePath("AnimationTree")
[node name="Sprite2D" parent="." index="0"] [node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("ShaderMaterial_crloj") material = ExtResource("2_a0d1l")
texture = ExtResource("2_sneas") texture = ExtResource("2_sneas")
hframes = 7 hframes = 7
vframes = 4 vframes = 4
frame = 7 frame = 7
[node name="AnimationPlayer" parent="." index="1"] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = { libraries = {
&"potato_mine": ExtResource("3_7tqmj") &"potato_mine": ExtResource("3_7tqmj")
} }
autoplay = "idle_unprimed" autoplay = "idle_unprimed"
[node name="AnimationTree" parent="." index="2"] [node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")]
tree_root = SubResource("AnimationNodeBlendTree_824aq") tree_root = SubResource("AnimationNodeBlendTree_824aq")
anim_player = NodePath("../AnimationPlayer")
parameters/TimeScale/scale = 1.0 parameters/TimeScale/scale = 1.0
parameters/Tree/conditions/explode = false parameters/Tree/conditions/explode = false
parameters/Tree/conditions/primed = 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_layer = 0
collision_mask = 8 collision_mask = 8
[node name="CollisionShape2D" type="CollisionShape2D" parent="Detectionbox" index="0"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Detectionbox"]
position = Vector2(0, 9) position = Vector2(0, 9)
shape = SubResource("CircleShape2D_824aq") shape = SubResource("CircleShape2D_824aq")
[node name="ExplosionBox" type="Area2D" parent="." index="4"] [node name="ExplosionBox" type="Area2D" parent="."]
collision_layer = 0 collision_layer = 0
collision_mask = 8 collision_mask = 8
script = ExtResource("3_2hd5y") script = ExtResource("3_2hd5y")
damage = 6000 damage = 6000
particles = ExtResource("5_px4r0") particles = ExtResource("5_px4r0")
[node name="CollisionShape2D" type="CollisionShape2D" parent="ExplosionBox" index="0"] [node name="CollisionShape2D" type="CollisionShape2D" parent="ExplosionBox"]
position = Vector2(0, 9) position = Vector2(0, 9)
shape = SubResource("CircleShape2D_wvns6") shape = SubResource("CircleShape2D_wvns6")
[node name="ExplosionPlayer" type="Node" parent="ExplosionBox" index="1"] [node name="ExplosionPlayer" type="Node" parent="ExplosionBox"]
script = ExtResource("7_b1j2f") script = ExtResource("7_b1j2f")
audioStream = ExtResource("8_3vqdc") audioStream = ExtResource("8_3vqdc")
channel = "explosion" channel = "explosion"
metadata/_custom_type_script = "uid://c36bj8u7jghc7" 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 wait_time = 15.0
one_shot = true one_shot = true
autostart = true autostart = true
script = ExtResource("8_824aq") script = ExtResource("8_824aq")
entity = NodePath("..") 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") script = ExtResource("4_twx65")
_hitbox = NodePath("../Hitbox") _hitbox = NodePath("../Hitbox")
detectionBox = NodePath("../Detectionbox") detectionBox = NodePath("../Detectionbox")
_unprimedShape = NodePath("../Hitbox/Unprimed") _unprimedShape = NodePath("../Hitbox/Unprimed")
_primedShape = NodePath("../Hitbox/Primed") _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) position = Vector2(-0.5, 14.5)
shape = SubResource("RectangleShape2D_qfqko") 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) position = Vector2(0, 16.5)
shape = SubResource("RectangleShape2D_ti2g4") shape = SubResource("RectangleShape2D_ti2g4")
disabled = true disabled = true
[node name="ChannelPlayer" type="Node" parent="." index="8"] [node name="ChannelPlayer" type="Node" parent="."]
script = ExtResource("7_b1j2f") script = ExtResource("7_b1j2f")
audioStream = ExtResource("9_3vqdc") audioStream = ExtResource("9_3vqdc")
channel = "plant_rise" channel = "plant_rise"
metadata/_custom_type_script = "uid://c36bj8u7jghc7" metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[node name="FlashController" parent="." index="9"] [node name="FlashController" type="Node" parent="."]
shaderMaterial = SubResource("ShaderMaterial_crloj") 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="area_entered" from="Detectionbox" to="Behaviour" method="OnAreaEntered"]
[connection signal="timeout" from="PrimeTimer" to="Behaviour" method="Prime"] [connection signal="timeout" from="PrimeTimer" to="Behaviour" method="Prime"]

View file

@ -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"]

View file

@ -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="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_moq7q"]
[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_ktw4a"] [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="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://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://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://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"] [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"] [sub_resource type="AtlasTexture" id="AtlasTexture_f4wwx"]
atlas = ExtResource("3_ktw4a") atlas = ExtResource("3_ktw4a")
region = Rect2(525, 241, 79, 72) region = Rect2(525, 241, 79, 72)
@ -30,26 +24,40 @@ region = Rect2(592, 64, 50, 60)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5jowj"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_5jowj"]
size = Vector2(40, 36) size = Vector2(40, 36)
[node name="Snipach" instance=ExtResource("1_ltcu2")] [node name="Snipach" type="Node2D" node_paths=PackedStringArray("_player", "_tree")]
internal_id = "snipach" script = ExtResource("1_moq7q")
MaxHP = 30.0 MaxHP = 30.0
_player = NodePath("AnimationPlayer")
_tree = NodePath("AnimationTree")
[node name="Sprite2D" parent="." index="0"] [node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("ShaderMaterial_f4wwx") material = ExtResource("2_moq7q")
position = Vector2(8, -16) position = Vector2(8, -16)
texture = SubResource("AtlasTexture_f4wwx") 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) position = Vector2(-0.75, -2.5)
shape = SubResource("RectangleShape2D_ktw4a") shape = SubResource("RectangleShape2D_ktw4a")
[node name="DragAction" type="Node" parent="Hitbox" index="1"] [node name="DragAction" type="Node" parent="Hitbox"]
script = ExtResource("4_5jowj") script = ExtResource("4_5jowj")
[node name="FlashController" parent="." index="4"] [node name="FlashController" type="Node" parent="."]
shaderMaterial = SubResource("ShaderMaterial_f4wwx") script = ExtResource("6_4uf0y")
shaderMaterial = ExtResource("2_moq7q")
[node name="ShootBox" type="Area2D" parent="." index="5"] [node name="ShootBox" type="Area2D" parent="."]
visible = false visible = false
collision_layer = 32 collision_layer = 32
collision_mask = 24 collision_mask = 24
@ -57,29 +65,30 @@ input_pickable = false
script = ExtResource("5_twsk4") script = ExtResource("5_twsk4")
_damage = 400 _damage = 400
[node name="Sprite2D" type="Sprite2D" parent="ShootBox" index="0"] [node name="Sprite2D" type="Sprite2D" parent="ShootBox"]
texture = SubResource("AtlasTexture_3hyni") texture = SubResource("AtlasTexture_3hyni")
[node name="CollisionShape2D" type="CollisionShape2D" parent="ShootBox" index="1"] [node name="CollisionShape2D" type="CollisionShape2D" parent="ShootBox"]
shape = SubResource("RectangleShape2D_5jowj") 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") script = ExtResource("6_twsk4")
attackBox = NodePath("../ShootBox") attackBox = NodePath("../ShootBox")
timer = NodePath("Timer") timer = NodePath("Timer")
guardTimer = NodePath("GuardTimer") 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 wait_time = 15.0
one_shot = true one_shot = true
script = ExtResource("7_3hyni") script = ExtResource("7_3hyni")
entity = NodePath("../..") entity = NodePath("../..")
[node name="GuardTimer" type="Timer" parent="Behaviour" index="1"] [node name="GuardTimer" type="Timer" parent="Behaviour"]
wait_time = 0.2 wait_time = 0.2
one_shot = true one_shot = true
autostart = true autostart = true
ignore_time_scale = 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="DragBegin" from="Hitbox/DragAction" to="Behaviour" method="OnDragBegin"]
[connection signal="DragEnd" from="Hitbox/DragAction" to="Behaviour" method="OnDragEnd"] [connection signal="DragEnd" from="Hitbox/DragAction" to="Behaviour" method="OnDragEnd"]

View file

@ -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="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="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"] [ext_resource type="PackedScene" uid="uid://domeukw4ucmyr" path="res://scenes/projectiles/snowpea_projectile.tscn" id="5_bv86m"]
[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="5_fbp2l"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_g872w"] [ext_resource type="Script" uid="uid://ceprqkraw3v6m" path="res://scripts/entities/plants/Shooter.cs" id="6_br16s"]
resource_local_to_scene = true [ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="8_bjd0y"]
shader = ExtResource("2_yyg2a") [ext_resource type="Script" uid="uid://bdk5iqtw4xbkl" path="res://scripts/entities/plants/behaviours/PeashooterBehaviour.cs" id="9_hg126"]
shader_parameter/FLASH_COLOR = Color(0.78, 0.78, 0.78, 0.501961) [ext_resource type="Script" uid="uid://dn53jvpjyg63l" path="res://scripts/entities/plants/Eyesight.cs" id="10_noqdw"]
shader_parameter/HIGHLIGHT_COLOR = Color(0.69, 0, 0, 0.282353) [ext_resource type="Script" uid="uid://hccb0aee0x0o" path="res://scripts/entities/plants/PlantEyesightLimiter.cs" id="11_terbf"]
shader_parameter/selected = false [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="12_dvoqf"]
shader_parameter/blend = 0.0 [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"] [sub_resource type="Animation" id="Animation_pephc"]
length = 0.001 length = 0.001
@ -71,28 +72,78 @@ node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"]
[sub_resource type="SegmentShape2D" id="SegmentShape2D_3oyhk"] [sub_resource type="SegmentShape2D" id="SegmentShape2D_3oyhk"]
resource_local_to_scene = true resource_local_to_scene = true
[node name="Snowpea" instance=ExtResource("1_lp85e")] [sub_resource type="RectangleShape2D" id="RectangleShape2D_r7xnh"]
internal_id = "snowpea" size = Vector2(20, 44)
[node name="Sprite2D" parent="." index="0"] [node name="Snowpea" type="Node2D" node_paths=PackedStringArray("_player", "_tree")]
material = SubResource("ShaderMaterial_g872w") 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") texture = ExtResource("2_ytrm0")
hframes = 10
vframes = 2
[node name="AnimationPlayer" parent="." index="1"] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = { libraries = {
&"": SubResource("AnimationLibrary_djmlc"), &"": SubResource("AnimationLibrary_djmlc"),
&"snowpea": ExtResource("4_jvx5y") &"snowpea": ExtResource("4_jvx5y")
} }
autoplay = "snowpea/idle" autoplay = "snowpea/idle"
[node name="AnimationTree" parent="." index="2"] [node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")]
tree_root = SubResource("AnimationNodeBlendTree_3oyhk") 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") _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") shape = SubResource("SegmentShape2D_3oyhk")
script = ExtResource("11_terbf")
[node name="FlashController" parent="." index="8"] [node name="Hitbox" type="Area2D" parent="."]
shaderMaterial = SubResource("ShaderMaterial_g872w") 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"]

View file

@ -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="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_kd62n"]
[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_63okc"]
[ext_resource type="Texture2D" uid="uid://coafh3mjharxo" path="res://assets/sprites/atlases/plants/spikeweed.png" id="2_ffrjr"] [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="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="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://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"] [ext_resource type="Script" uid="uid://dw7v3s4kbu7ma" path="res://scripts/entities/AnimationStatistics.cs" id="5_yfuxj"]
[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="6_sqcsr"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_yfuxj"] [ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="9_lq7xg"]
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
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_jleqa"] [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"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_1di76"]
size = Vector2(49, 38) size = Vector2(49, 38)
[node name="Spikeweed" instance=ExtResource("1_vmbvr")] [node name="Spikeweed" type="Node2D" node_paths=PackedStringArray("_player", "_tree")]
internal_id = "spikeweed" script = ExtResource("1_kd62n")
MaxHP = 30.0 MaxHP = 30.0
_player = NodePath("AnimationPlayer")
_tree = NodePath("AnimationTree")
[node name="Sprite2D" parent="." index="0"] [node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("ShaderMaterial_yfuxj") material = ExtResource("2_kd62n")
texture = ExtResource("2_ffrjr") texture = ExtResource("2_ffrjr")
hframes = 10 hframes = 10
vframes = 2 vframes = 2
frame = 6 frame = 1
[node name="AnimationPlayer" parent="." index="1"] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = { libraries = {
&"spikeweed": ExtResource("3_nwshn") &"spikeweed": ExtResource("3_nwshn")
} }
[node name="DPSStatistics" type="Node" parent="AnimationPlayer" index="0"] [node name="DPSStatistics" type="Node" parent="AnimationPlayer"]
script = ExtResource("5_yfuxj") script = ExtResource("5_yfuxj")
animationName = "spikeweed/attack" animationName = "spikeweed/attack"
trackToFind = "Hitbox" trackToFind = "Hitbox"
[node name="AnimationTree" parent="." index="2"] [node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")]
tree_root = SubResource("AnimationNodeBlendTree_63okc") tree_root = SubResource("AnimationNodeBlendTree_63okc")
anim_player = NodePath("../AnimationPlayer")
parameters/TimeScale/scale = 1.0 parameters/TimeScale/scale = 1.0
parameters/Tree/blend_position = 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") script = ExtResource("3_uhpn7")
[node name="Hitbox" parent="." index="4"] [node name="Hitbox" type="Area2D" parent="."]
collision_layer = 4 collision_layer = 4
collision_mask = 8 collision_mask = 8
script = ExtResource("3_hqtbm") script = ExtResource("3_hqtbm")
_damage = 6 _damage = 6
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
position = Vector2(0.5, 9) position = Vector2(0.5, 9)
shape = SubResource("RectangleShape2D_1di76") shape = SubResource("RectangleShape2D_1di76")
[node name="FlashController" parent="." index="5"] [node name="FlashController" type="Node" parent="."]
shaderMaterial = SubResource("ShaderMaterial_yfuxj") 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_entered" from="Hitbox" to="Behaviour" method="OnHitboxEntered"]
[connection signal="area_exited" from="Hitbox" to="Behaviour" method="OnHitboxExited"] [connection signal="area_exited" from="Hitbox" to="Behaviour" method="OnHitboxExited"]

View file

@ -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="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="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="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="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://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"] [ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="7_rlkb7"]
[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="10_w3e3c"]
[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
[sub_resource type="Animation" id="Animation_bfx6v"] [sub_resource type="Animation" id="Animation_bfx6v"]
length = 0.001 length = 0.001
@ -73,56 +67,67 @@ node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4xs4g"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_4xs4g"]
size = Vector2(26, 48) size = Vector2(26, 48)
[node name="Sunflower" instance=ExtResource("1_bikjn")] [node name="Sunflower" type="Node2D" node_paths=PackedStringArray("_player", "_tree")]
internal_id = "sunflower" script = ExtResource("1_yyn2e")
MaxHP = 30.0 MaxHP = 30.0
_player = NodePath("AnimationPlayer")
_tree = NodePath("AnimationTree")
[node name="Sprite2D" parent="." index="0"] [node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("ShaderMaterial_mdjfv") material = ExtResource("2_yyn2e")
texture = ExtResource("2_fwcda") texture = ExtResource("2_fwcda")
hframes = 9 hframes = 9
vframes = 2 vframes = 2
frame = 2 frame = 4
[node name="AnimationPlayer" parent="." index="1"] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = { libraries = {
&"": SubResource("AnimationLibrary_ek2al"), &"": SubResource("AnimationLibrary_ek2al"),
&"sunflower": ExtResource("3_btsik") &"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") tree_root = SubResource("AnimationNodeBlendTree_rlkb7")
anim_player = NodePath("../AnimationPlayer")
parameters/TimeScale/scale = 1.0 parameters/TimeScale/scale = 1.0
parameters/Tree/conditions/produce = false 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) position = Vector2(-2, 0)
script = ExtResource("3_te0pl") script = ExtResource("3_te0pl")
_sunScene = ExtResource("4_b8hls") _sunScene = ExtResource("4_b8hls")
_amountPerSun = 25 _amountPerSun = 25
[node name="Behaviour" type="Node" parent="." index="4"] [node name="Behaviour" type="Node" parent="."]
script = ExtResource("5_26je0") 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 wait_time = 24.25
script = ExtResource("7_rlkb7") script = ExtResource("7_rlkb7")
entity = NodePath("../..") 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 wait_time = 12.0
one_shot = true one_shot = true
autostart = true autostart = true
script = ExtResource("7_rlkb7") script = ExtResource("7_rlkb7")
entity = NodePath("../..") 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) position = Vector2(0, 4)
shape = SubResource("RectangleShape2D_4xs4g") shape = SubResource("RectangleShape2D_4xs4g")
[node name="FlashController" parent="." index="6"] [node name="FlashController" type="Node" parent="."]
shaderMaterial = SubResource("ShaderMaterial_mdjfv") 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/Timer" to="Behaviour" method="Timeout"]
[connection signal="timeout" from="Behaviour/StartTimer" 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"] [connection signal="timeout" from="Behaviour/StartTimer" to="Behaviour/Timer" method="start"]

View file

@ -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="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="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://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"] [sub_resource type="Animation" id="Animation_a2y0j"]
length = 0.001 length = 0.001
@ -134,39 +143,89 @@ resource_local_to_scene = true
[sub_resource type="SegmentShape2D" id="SegmentShape2D_yb26d"] [sub_resource type="SegmentShape2D" id="SegmentShape2D_yb26d"]
resource_local_to_scene = true resource_local_to_scene = true
[node name="Threepeater" instance=ExtResource("1_muntu")] [sub_resource type="RectangleShape2D" id="RectangleShape2D_r7xnh"]
internal_id = "threepeater" 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) position = Vector2(6, -13)
texture = ExtResource("2_j7h7q") texture = ExtResource("2_j7h7q")
hframes = 13 hframes = 13
vframes = 2
[node name="AnimationPlayer" parent="." index="1"] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = { libraries = {
&"": SubResource("AnimationLibrary_ipp6b"), &"": SubResource("AnimationLibrary_ipp6b"),
&"threepeater": SubResource("AnimationLibrary_o2obw") &"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") 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) position = Vector2(20, -9)
script = ExtResource("2_ieami") script = ExtResource("2_ieami")
_projectile = ExtResource("6_kscbk")
_timer = NodePath("FireTimer")
[node name="Timer" parent="Shooter" index="0"] [node name="FireTimer" type="Timer" parent="Shooter" node_paths=PackedStringArray("entity")]
wait_time = 1.6 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") 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) position = Vector2(0, 60)
shape = SubResource("SegmentShape2D_yb26d") shape = SubResource("SegmentShape2D_yb26d")
script = ExtResource("3_dqn6w") script = ExtResource("3_dqn6w")
[node name="CollisionShape2D3" type="CollisionShape2D" parent="Eysight" index="2"] [node name="CollisionShape2D3" type="CollisionShape2D" parent="Eysight"]
position = Vector2(0, -60) position = Vector2(0, -60)
shape = SubResource("SegmentShape2D_yb26d") shape = SubResource("SegmentShape2D_yb26d")
script = ExtResource("3_dqn6w") 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"]

View file

@ -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="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_mnh2m"]
[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_bi7an"] [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="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="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"] [ext_resource type="Script" uid="uid://btkmd86pn828y" path="res://scripts/entities/plants/behaviours/HpBasedBehaviour.cs" id="4_cjtyy"]
[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="5_2hmhw"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ladjs"] [ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="7_frxj2"]
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
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_y3tlf"] [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"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_khltr"]
size = Vector2(33, 46) size = Vector2(33, 46)
[node name="Wallnut" instance=ExtResource("1_fluxn")] [node name="Wallnut" type="Node2D" node_paths=PackedStringArray("_player", "_tree")]
internal_id = "wallnut" script = ExtResource("1_mnh2m")
MaxHP = 600.0 MaxHP = 600.0
_player = NodePath("AnimationPlayer")
_tree = NodePath("AnimationTree")
[node name="Sprite2D" parent="." index="0"] [node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("ShaderMaterial_ladjs") material = ExtResource("2_mnh2m")
texture = ExtResource("2_o5tda") texture = ExtResource("2_o5tda")
hframes = 12 hframes = 12
vframes = 3 vframes = 3
frame = 10
[node name="AnimationPlayer" parent="." index="1"] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = { libraries = {
&"wallnut": ExtResource("3_xl65q") &"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") tree_root = SubResource("AnimationNodeBlendTree_bi7an")
anim_player = NodePath("../AnimationPlayer")
parameters/TimeScale/scale = 1.0 parameters/TimeScale/scale = 1.0
parameters/Tree/blend_position = 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) position = Vector2(3.5, 5)
shape = SubResource("RectangleShape2D_khltr") shape = SubResource("RectangleShape2D_khltr")
[node name="Behaviour" type="Node" parent="." index="4"] [node name="Behaviour" type="Node" parent="."]
script = ExtResource("4_cjtyy") script = ExtResource("4_cjtyy")
parameters = Array[String](["parameters/Tree/blend_position"]) parameters = Array[String](["parameters/Tree/blend_position"])
[node name="FlashController" parent="." index="5"] [node name="FlashController" type="Node" parent="."]
shaderMaterial = SubResource("ShaderMaterial_ladjs") script = ExtResource("7_frxj2")
shaderMaterial = ExtResource("2_mnh2m")
[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"]
[connection signal="OnHPChanged" from="." to="Behaviour" method="OnHPChanged"] [connection signal="OnHPChanged" from="." to="Behaviour" method="OnHPChanged"]

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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="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"] [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="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="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://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://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"] [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_right = 6.0
texture_margin_bottom = 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"] [sub_resource type="GDScript" id="GDScript_flqon"]
resource_name = "version_label" resource_name = "version_label"
script/source = "extends Label script/source = "extends Label
@ -195,7 +199,7 @@ channel = "button"
metadata/_custom_type_script = "uid://c36bj8u7jghc7" metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("9_j7ex8") stream = SubResource("AudioStreamPlaylist_7b55j")
volume_db = -20.0 volume_db = -20.0
autoplay = true autoplay = true
bus = &"MusicBus" bus = &"MusicBus"

View file

@ -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")

View file

@ -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"] [sub_resource type="AtlasTexture" id="AtlasTexture_h74iy"]
resource_name = "cucumber" atlas = ExtResource("2_12o6v")
script/source = "extends Node2D region = Rect2(24, 88, 7, 13)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_iyfw1"]
radius = 6.0
height = 24.0
func _ready() -> void: [node name="CucumberProjectile" instance=ExtResource("1_iyfw1")]
await get_tree().process_frame _speed = 5.0
get_child(0).reparent(get_parent()) _damage = 25
get_child(0).reparent(get_parent())
queue_free()
"
[node name="CucumberProjectileScene" type="Node2D"] [node name="Sprite" parent="." index="0"]
script = SubResource("GDScript_3auks") rotation = -1.5708
texture = SubResource("AtlasTexture_h74iy")
[node name="CucumberProjectile" parent="." instance=ExtResource("1_3auks")] [node name="CollisionShape2D" parent="." index="1"]
rotation = 1.5708 shape = SubResource("CapsuleShape2D_iyfw1")
[node name="CucumberProjectile2" parent="." instance=ExtResource("1_3auks")]
rotation = 4.71239

View file

@ -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

View file

@ -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")

View file

@ -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)

View file

@ -622,23 +622,27 @@ Structures = NodePath("Structures")
Particles = NodePath("Particles") Particles = NodePath("Particles")
[node name="Zombies" type="Node2D" parent="Pools"] [node name="Zombies" type="Node2D" parent="Pools"]
z_index = 3 z_index = 20
z_as_relative = false
y_sort_enabled = true y_sort_enabled = true
[node name="Plants" type="Node2D" parent="Pools"] [node name="Plants" type="Node2D" parent="Pools"]
z_index = 1 z_as_relative = false
y_sort_enabled = true y_sort_enabled = true
[node name="Projectiles" type="Node2D" parent="Pools"] [node name="Projectiles" type="Node2D" parent="Pools"]
z_index = 4 z_index = 30
z_as_relative = false
y_sort_enabled = true y_sort_enabled = true
[node name="Structures" type="Node2D" parent="Pools"] [node name="Structures" type="Node2D" parent="Pools"]
z_index = 2 z_index = 10
z_as_relative = false
y_sort_enabled = true y_sort_enabled = true
[node name="Particles" type="Node2D" parent="Pools"] [node name="Particles" type="Node2D" parent="Pools"]
z_index = 5 z_index = 40
z_as_relative = false
[node name="Lines" type="Node2D" parent="."] [node name="Lines" type="Node2D" parent="."]
script = ExtResource("3_4bmqp") script = ExtResource("3_4bmqp")
@ -688,6 +692,8 @@ layer = -2
follow_viewport_enabled = true follow_viewport_enabled = true
[node name="Background" type="Sprite2D" parent="Background"] [node name="Background" type="Sprite2D" parent="Background"]
z_index = -100
z_as_relative = false
position = Vector2(500, 200) position = Vector2(500, 200)
texture = ExtResource("4_y72yf") texture = ExtResource("4_y72yf")
metadata/_edit_lock_ = true metadata/_edit_lock_ = true
@ -828,7 +834,7 @@ follow_viewport_enabled = true
script = ExtResource("13_0x4ji") script = ExtResource("13_0x4ji")
[node name="Hitbox" type="Area2D" parent="GameOverZombie/LoseZone"] [node name="Hitbox" type="Area2D" parent="GameOverZombie/LoseZone"]
collision_layer = 2 collision_layer = 6
[node name="CollisionShape2D" type="CollisionShape2D" parent="GameOverZombie/LoseZone/Hitbox"] [node name="CollisionShape2D" type="CollisionShape2D" parent="GameOverZombie/LoseZone/Hitbox"]
position = Vector2(122, 199.5) position = Vector2(122, 199.5)

View file

@ -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="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://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"] [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") _tree = NodePath("AnimationTree")
[node name="Sprite2D" type="Sprite2D" parent="."] [node name="Sprite2D" type="Sprite2D" parent="."]
material = ExtResource("2_3uws4")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
@ -26,6 +24,5 @@ collision_mask = 0
[node name="FlashController" type="Node" parent="."] [node name="FlashController" type="Node" parent="."]
script = ExtResource("4_3uws4") script = ExtResource("4_3uws4")
shaderMaterial = ExtResource("2_3uws4")
[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"] [connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"]

View file

@ -1,9 +1,14 @@
using Godot;
namespace Newlon; namespace Newlon;
public static class LON 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);
} }
} }

View file

@ -42,7 +42,7 @@ public partial class SaveSerializer : Node
foreach (var plant in playerProgress.PlayerPlants) foreach (var plant in playerProgress.PlayerPlants)
{ {
save.PlayerPlants.Add(plant.internal_id); save.PlayerPlants.Add(plant.GetInternalID());
} }
access.StoreString(JsonSerializer.Serialize<SaveData>(save)); access.StoreString(JsonSerializer.Serialize<SaveData>(save));

View file

@ -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);
}
}
}

View file

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

View file

@ -113,8 +113,7 @@ public partial class Entity : Node2D
#region Effects #region Effects
[Export] private Array<Effect> _effectImmunities = new(); [Export] private Array<Effect> _effectImmunities = new();
[Export] private bool completeInvulnerability = false; [Export] private bool completeInvulnerability = false;
private readonly Dictionary<string, Effect> _activeEffectSlots = new(); private readonly Dictionary<string, EffectHandler> effectHandlers = new();
private readonly Dictionary<string, Timer> _effectSlotTimers = new();
[Signal] public delegate void EffectStartedEventHandler(Effect what); [Signal] public delegate void EffectStartedEventHandler(Effect what);
[Signal] public delegate void EffectEndedEventHandler(Effect what); [Signal] public delegate void EffectEndedEventHandler(Effect what);
@ -123,50 +122,25 @@ public partial class Entity : Node2D
public virtual void GiveEffect(Effect what) public virtual void GiveEffect(Effect what)
{ {
if (Killed) return; if (what == null ||
if (_effectImmunities.Contains(what) || completeInvulnerability) Killed ||
{ completeInvulnerability || _effectImmunities.Contains(what))
return; return;
}
string slot = what.Slot; var slot = what.Slot;
if (_activeEffectSlots.ContainsKey(slot) == false) if (effectHandlers.ContainsKey(slot) == false)
{
InitSlot(slot); InitSlot(slot);
}
if (what == _activeEffectSlots[slot]) if (effectHandlers[slot].HandledEffect == what)
{ {
EmitSignal(SignalName.EffectContinued, what); effectHandlers[slot].Restart();
} }
else 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) public void EndEffect(Effect what)
@ -174,34 +148,48 @@ public partial class Entity : Node2D
EndEffectAtSlot(what.Slot); EndEffectAtSlot(what.Slot);
} }
public Tween CreateTweenEffect(Effect effect)
{
Tween tween = CreateTween();
effectHandlers[effect.Slot].EffectTween = tween;
return tween;
}
protected void ClearEffects() protected void ClearEffects()
{ {
foreach (var slot in _activeEffectSlots.Keys) foreach (var slot in effectHandlers.Keys)
{ {
if (_activeEffectSlots[slot] != null) effectHandlers[slot].End();
{
_activeEffectSlots[slot].Exit(this);
_effectSlotTimers[slot].Stop();
_activeEffectSlots[slot] = null;
}
} }
} }
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() public void ProcessEffects()
{ {
if (Killed) return; foreach (var slot in effectHandlers.Keys)
foreach (string key in _activeEffectSlots.Keys) {
_activeEffectSlots[key]?.Process(this); effectHandlers[slot].Process();
}
} }
private void EndEffectAtSlot(string slot) private void EndEffectAtSlot(string slot)
{ {
_activeEffectSlots[slot].Exit(this); EmitSignal(SignalName.EffectEnded, effectHandlers[slot].HandledEffect);
_activeEffectSlots[slot] = null; effectHandlers[slot].End();
EmitSignal(SignalName.EffectEnded, _activeEffectSlots[slot]);
} }
#endregion #endregion
#region LocalTimescale #region LocalTimescale
private float _localTimescale = 1.0f; private float _localTimescale = 1.0f;

View file

@ -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)
{
}
}

View file

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

View file

@ -10,8 +10,6 @@ namespace Newlon.Components.Plants;
public partial class RuntimePlantData : Entity public partial class RuntimePlantData : Entity
{ {
[Export]
public string internal_id;
public int Line { get; set; } public int Line { get; set; }
public PlantResource Resource; public PlantResource Resource;
private AudioStream eatenSound = ResourceLoader.Load<AudioStream>("res://assets/audio/sfx/gulp.mp3"); private AudioStream eatenSound = ResourceLoader.Load<AudioStream>("res://assets/audio/sfx/gulp.mp3");
@ -22,7 +20,7 @@ public partial class RuntimePlantData : Entity
} }
public override void Kill() public override void Kill()
{ {
PoolContainer.Instance.EntityField[Resource.Layer].Remove(GlobalPosition); PoolContainer.Instance.RemoveEntity(GlobalPosition, Resource.Layer);
QueueFree(); QueueFree();
} }
} }

View file

@ -8,12 +8,13 @@ public partial class AloeBehaviour : BaseBehaviour
[Export] private float _hpTreshold = 0.25f; [Export] private float _hpTreshold = 0.25f;
private Timer _timer; private Timer _timer;
private bool _charge = true; private bool _charge = true;
private PackedScene particlesPacked = ResourceLoader.Load<PackedScene>("uid://b3na62o5pu1gt");
public override void _Ready() public override void _Ready()
{ {
base._Ready(); base._Ready();
_timer = GetNode<Timer>("Timer"); _timer = GetNode<Timer>("Timer");
} }
public override void _Process(double delta) public override void _Process(double delta)
{ {
@ -34,9 +35,12 @@ public partial class AloeBehaviour : BaseBehaviour
public void Heal() public void Heal()
{ {
var checkPos = GetParent<Node2D>().GlobalPosition + Vector2.Right * FieldParams.TileWidth; var checkPos = GetParent<Node2D>().GlobalPosition + Vector2.Right * FieldParams.TileWidth;
if (PoolContainer.Instance.TryGetEntity(checkPos, out RuntimePlantData plantData)) if (PoolContainer.Instance.TryGetEntity(checkPos, out RuntimePlantData plantData))
{ {
plantData.Heal(300, GetParent()); plantData.Heal(300, GetParent());
var particles = particlesPacked.Instantiate<Node2D>();
PoolContainer.Instance.Particles.AddChild(particles);
particles.GlobalPosition = plantData.GlobalPosition;
} }
} }

View file

@ -15,4 +15,5 @@ public partial class LevelGUIElements : Control
{ {
Instance = this; Instance = this;
} }
} }

View file

@ -96,7 +96,7 @@ public partial class ShovelButton : TextureButton
var checkedPosition = (position / FieldParams.Tile).Ceil() * FieldParams.Tile - new Vector2(20, 14); var checkedPosition = (position / FieldParams.Tile).Ceil() * FieldParams.Tile - new Vector2(20, 14);
for (int i = FieldParams.LayersCount - 1; i >= 0; i--) 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; return plantData;
} }

Some files were not shown because too many files have changed in this diff Show more