Debug zombie spawner

This commit is contained in:
Rendo 2025-06-24 18:44:49 +05:00
commit 0fff33d196
69 changed files with 564 additions and 100 deletions

View file

@ -1,19 +1,20 @@
[gd_scene load_steps=11 format=3 uid="uid://crxsvv7drckpw"]
[gd_scene load_steps=9 format=3 uid="uid://crxsvv7drckpw"]
[ext_resource type="Script" uid="uid://bndu1h5kgcde8" path="res://scripts/components/level/RuntimeLevelData.cs" id="1_i3bf5"]
[ext_resource type="Texture2D" uid="uid://b0tb2hjum40aw" path="res://assets/sprites/background_summer.png" id="2_vmxhy"]
[ext_resource type="PackedScene" uid="uid://cg8713v6c5w15" path="res://scenes/level components/pools.tscn" id="3_jv7x4"]
[ext_resource type="Script" uid="uid://bso32xkw738sy" path="res://scripts/components/level/PoolContainer.cs" id="3_1y18w"]
[ext_resource type="PackedScene" uid="uid://dpxxjfd5lv5sv" path="res://scenes/gui/choose_your_seeds.tscn" id="5_5e78h"]
[ext_resource type="PackedScene" uid="uid://devn21c7luf45" path="res://scenes/level components/field_controller.tscn" id="5_lwpg6"]
[ext_resource type="PackedScene" uid="uid://cfnmspei3k4p7" path="res://scenes/gui/runtime_gui.tscn" id="6_0baou"]
[ext_resource type="PackedScene" uid="uid://bpekho7leatr5" path="res://scenes/sun.tscn" id="6_ay12k"]
[ext_resource type="Script" uid="uid://cslqjdd5wq4rc" path="res://scripts/components/level/SunSpawner.cs" id="6_lkguy"]
[ext_resource type="PackedScene" uid="uid://xu4i6tmkv00a" path="res://scenes/entities/Zombies/bucket_zombie.tscn" id="9_u7o5c"]
[ext_resource type="PackedScene" uid="uid://hhjbqkjqpt7x" path="res://scenes/entities/Zombies/cone_zombie.tscn" id="10_q4fsb"]
[node name="debug_lvl" type="Node2D"]
y_sort_enabled = true
[node name="SummertimeSaga" type="Sprite2D" parent="."]
z_index = -4096
z_as_relative = false
position = Vector2(500, 200)
texture = ExtResource("2_vmxhy")
metadata/_edit_lock_ = true
@ -26,7 +27,28 @@ metadata/_edit_lock_ = true
script = ExtResource("1_i3bf5")
SunCount = 999999
[node name="Pools" parent="." instance=ExtResource("3_jv7x4")]
[node name="Pools" type="Node2D" parent="." node_paths=PackedStringArray("Zombies", "Plants", "Projectiles", "Structures")]
script = ExtResource("3_1y18w")
Zombies = NodePath("Zombies")
Plants = NodePath("Plants")
Projectiles = NodePath("Projectiles")
Structures = NodePath("Structures")
[node name="Zombies" type="Node2D" parent="Pools"]
z_index = 3
y_sort_enabled = true
[node name="Plants" type="Node2D" parent="Pools"]
z_index = 1
y_sort_enabled = true
[node name="Projectiles" type="Node2D" parent="Pools"]
z_index = 4
y_sort_enabled = true
[node name="Structures" type="Node2D" parent="Pools"]
z_index = 2
y_sort_enabled = true
[node name="GuiLayer" type="CanvasLayer" parent="."]
layer = 10
@ -50,10 +72,4 @@ SunScene = ExtResource("6_ay12k")
wait_time = 5.0
autostart = true
[node name="BucketZombie" parent="." instance=ExtResource("9_u7o5c")]
position = Vector2(729, 257)
[node name="ConeZombie" parent="." instance=ExtResource("10_q4fsb")]
position = Vector2(729, 313)
[connection signal="timeout" from="SunSpawner/Timer" to="SunSpawner" method="Spawn"]

View file

@ -0,0 +1,41 @@
[gd_scene load_steps=2 format=3 uid="uid://cubfkr2mkgxjc"]
[ext_resource type="Script" uid="uid://dac0bvlhho7u4" path="res://scripts/DebugZombieSpawner.cs" id="1_m367a"]
[node name="DebugZombieSpawner" type="PopupPanel" node_paths=PackedStringArray("label", "line", "spin")]
initial_position = 1
size = Vector2i(200, 100)
visible = true
script = ExtResource("1_m367a")
label = NodePath("Vbox/Similars")
line = NodePath("Vbox/Line/LineEdit")
spin = NodePath("Vbox/Line/SpinBox")
[node name="Vbox" type="VBoxContainer" parent="."]
offset_left = 4.0
offset_top = 4.0
offset_right = 196.0
offset_bottom = 96.0
[node name="Line" type="HBoxContainer" parent="Vbox"]
layout_mode = 2
[node name="LineEdit" type="LineEdit" parent="Vbox/Line"]
layout_mode = 2
size_flags_horizontal = 3
focus_next = NodePath("../SpinBox")
max_length = 16
[node name="SpinBox" type="SpinBox" parent="Vbox/Line"]
layout_mode = 2
min_value = 1.0
max_value = 50.0
value = 1.0
[node name="Similars" type="Label" parent="Vbox"]
layout_mode = 2
size_flags_vertical = 3
[connection signal="popup_hide" from="." to="." method="OnPopupHide"]
[connection signal="text_changed" from="Vbox/Line/LineEdit" to="." method="OnTextChanged"]
[connection signal="text_submitted" from="Vbox/Line/LineEdit" to="." method="OnTextSubmitted"]

View file

@ -16,8 +16,8 @@ shader_parameter/amount = 0.0
material = SubResource("ShaderMaterial_wdi07")
[node name="Hat" parent="CanvasGroup" index="1"]
position = Vector2(-7, -83)
position = Vector2(-12, -83)
texture = ExtResource("3_0nlp0")
[node name="Armor" parent="." index="8"]
[node name="Armor" parent="." index="7"]
_maxHP = 180

View file

@ -18,10 +18,10 @@ _armor = NodePath("Armor")
material = SubResource("ShaderMaterial_sat5k")
[node name="Hat" type="Sprite2D" parent="CanvasGroup" index="1"]
position = Vector2(-6, -88)
position = Vector2(-12, -88)
texture = ExtResource("4_qdhik")
[node name="Armor" type="Node" parent="." index="8"]
[node name="Armor" type="Node" parent="." index="7"]
script = ExtResource("3_5s7in")
_maxHP = 60

View file

@ -174,12 +174,12 @@ material = SubResource("ShaderMaterial_w8pya")
[node name="Can" type="Node2D" parent="CanvasGroup" index="1"]
[node name="Sprite2D" type="Sprite2D" parent="CanvasGroup/Can" index="0"]
position = Vector2(3, -40)
position = Vector2(-4, -40)
texture = SubResource("AtlasTexture_w8pya")
[node name="Sprite2D2" type="Sprite2D" parent="CanvasGroup/Can" index="1"]
z_index = -1
position = Vector2(1, -63)
position = Vector2(-6, -63)
texture = SubResource("AtlasTexture_5selg")
[node name="AnimationPlayer" parent="." index="3"]

View file

@ -1,7 +1,7 @@
[gd_scene load_steps=27 format=3 uid="uid://co11v3w8hbwgf"]
[ext_resource type="Script" uid="uid://dildme6epx8l4" path="res://scripts/components/zombies/RuntimeZombieData.cs" id="1_qq3f1"]
[ext_resource type="Texture2D" uid="uid://bwwbkybryi6k0" path="res://assets/sprites/zombie.tres" id="2_4pdxh"]
[ext_resource type="Texture2D" uid="uid://bwdqbrnn7ygtr" path="res://assets/sprites/atlases/zombies/Зондби.png" id="2_4pdxh"]
[ext_resource type="Shader" uid="uid://d0eo5uuj222c4" path="res://assets/shaders/CG_color_blender.gdshader" id="2_srwwe"]
[ext_resource type="Script" uid="uid://dqyony6jxt2p0" path="res://scripts/components/zombies/EatBox.cs" id="3_2aulo"]
[ext_resource type="Script" uid="uid://c5vfccegyy01t" path="res://scripts/components/FlashComponent.cs" id="3_rao3m"]
@ -103,7 +103,7 @@ material = SubResource("ShaderMaterial_63ls2")
script = ExtResource("3_rao3m")
[node name="Sprite" type="Sprite2D" parent="CanvasGroup"]
position = Vector2(0, -44)
position = Vector2(-4, -55)
texture = ExtResource("2_4pdxh")
[node name="Hitbox" type="Area2D" parent="."]

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=14 format=3 uid="uid://bes4e6sksax67"]
[gd_scene load_steps=14 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="Texture2D" uid="uid://dff73m8ahamaa" path="res://assets/sprites/atlases/plants/garlic.png" id="2_w2jbi"]

View file

@ -3,11 +3,11 @@
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_pyk3o"]
[ext_resource type="Texture2D" uid="uid://cksryh4w5dbbx" path="res://assets/sprites/atlases/plants/peashooter.png" id="2_14qlx"]
[ext_resource type="AnimationLibrary" uid="uid://bv1dl1g4dmbho" path="res://resources/animations/plants/peashooter.res" id="3_8lrhp"]
[ext_resource type="Script" path="res://scripts/components/plants/Shooter.cs" id="3_a4ew1"]
[ext_resource type="Script" uid="uid://ceprqkraw3v6m" path="res://scripts/components/plants/Shooter.cs" id="3_a4ew1"]
[ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/projectiles/pea.tscn" id="4_saxds"]
[ext_resource type="Script" path="res://scripts/components/plants/behaviours/PeashooterBehaviour.cs" id="5_7qiua"]
[ext_resource type="Script" path="res://scripts/components/plants/Eyesight.cs" id="7_2bki8"]
[ext_resource type="Script" path="res://scripts/components/plants/PlantEyesightLimiter.cs" id="8_nl4jc"]
[ext_resource type="Script" uid="uid://bdk5iqtw4xbkl" path="res://scripts/components/plants/behaviours/PeashooterBehaviour.cs" id="5_7qiua"]
[ext_resource type="Script" uid="uid://dn53jvpjyg63l" path="res://scripts/components/plants/Eyesight.cs" id="7_2bki8"]
[ext_resource type="Script" uid="uid://hccb0aee0x0o" path="res://scripts/components/plants/PlantEyesightLimiter.cs" id="8_nl4jc"]
[sub_resource type="Animation" id="Animation_a2y0j"]
length = 0.001
@ -26,7 +26,7 @@ tracks/0/keys = {
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ipp6b"]
_data = {
"RESET": SubResource("Animation_a2y0j")
&"RESET": SubResource("Animation_a2y0j")
}
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_34v85"]
@ -68,8 +68,8 @@ vframes = 2
[node name="AnimationPlayer" parent="." index="1"]
libraries = {
"": SubResource("AnimationLibrary_ipp6b"),
"peashooter": ExtResource("3_8lrhp")
&"": SubResource("AnimationLibrary_ipp6b"),
&"peashooter": ExtResource("3_8lrhp")
}
autoplay = "peashooter/idle"
@ -87,12 +87,10 @@ _timer = NodePath("Timer")
wait_time = 1.5
one_shot = true
[node name="Behaviour" type="Node" parent="." index="4" node_paths=PackedStringArray("_player", "_shootTimer", "_sight")]
[node name="Behaviour" type="Node" parent="." index="4" node_paths=PackedStringArray("_shootTimer", "_sight")]
script = ExtResource("5_7qiua")
_player = NodePath("../AnimationPlayer")
_shootTimer = NodePath("../Shooter/Timer")
_sight = NodePath("../Eysight")
_libName = "peashooter"
[node name="Eysight" type="Area2D" parent="." index="5"]
collision_layer = 4

View file

@ -2,9 +2,9 @@
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_dj7ul"]
[ext_resource type="Texture2D" uid="uid://c77o6ba0mw7a3" path="res://assets/sprites/atlases/plants/potato_mine.png" id="2_sneas"]
[ext_resource type="Script" path="res://scripts/components/plants/ExplosionComponent.cs" id="3_2hd5y"]
[ext_resource type="Script" uid="uid://bhl6o2m3fn4xg" path="res://scripts/components/plants/ExplosionComponent.cs" id="3_2hd5y"]
[ext_resource type="AnimationLibrary" uid="uid://bjlbdvr6f0r7e" path="res://resources/animations/plants/potato_mine.res" id="3_7tqmj"]
[ext_resource type="Script" path="res://scripts/components/plants/behaviours/PotatomineBehaviour.cs" id="4_twx65"]
[ext_resource type="Script" uid="uid://c7qfh4py0uulo" path="res://scripts/components/plants/behaviours/PotatomineBehaviour.cs" id="4_twx65"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_6uutc"]
animation = &"potato_mine/explode"
@ -70,10 +70,11 @@ _maxHP = 100
texture = ExtResource("2_sneas")
hframes = 7
vframes = 4
frame = 7
[node name="AnimationPlayer" parent="." index="1"]
libraries = {
"potato_mine": ExtResource("3_7tqmj")
&"potato_mine": ExtResource("3_7tqmj")
}
autoplay = "idle_unprimed"

View file

@ -3,7 +3,7 @@
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_fluxn"]
[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://resources/animations/plants/wallnut.res" id="3_xl65q"]
[ext_resource type="Script" path="res://scripts/components/plants/behaviours/HpBasedBehaviour.cs" id="4_cjtyy"]
[ext_resource type="Script" uid="uid://btkmd86pn828y" path="res://scripts/components/plants/behaviours/HpBasedBehaviour.cs" id="4_cjtyy"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ds5ry"]
animation = &"wallnut/idle_full"
@ -34,10 +34,11 @@ _maxHP = 1000
texture = ExtResource("2_o5tda")
hframes = 12
vframes = 3
frame = 3
[node name="AnimationPlayer" parent="." index="1"]
libraries = {
"wallnut": ExtResource("3_xl65q")
&"wallnut": ExtResource("3_xl65q")
}
[node name="AnimationTree" parent="." index="2"]

View file

@ -2,7 +2,7 @@
[ext_resource type="PackedScene" uid="uid://ky35veswaytr" path="res://scenes/gui/sun_counter.tscn" id="1_le3od"]
[ext_resource type="Theme" uid="uid://b8l285cjcgeyi" path="res://resources/themes/GameStyle.tres" id="1_xf6ra"]
[ext_resource type="Script" path="res://scripts/components/LevelGUIElements.cs" id="2_5fonq"]
[ext_resource type="Script" uid="uid://cwa1eydeiy3y4" path="res://scripts/components/LevelGUIElements.cs" id="2_5fonq"]
[ext_resource type="Texture2D" uid="uid://bbh0uwloi87tn" path="res://assets/sprites/gui/PlantPanel.png" id="2_eg3hk"]
[ext_resource type="PackedScene" uid="uid://t0vpmycj6c8j" path="res://scenes/gui/shovel_button.tscn" id="3_bheea"]
[ext_resource type="PackedScene" uid="uid://cgm7td1hgs0rr" path="res://scenes/gui/fast_forward_button.tscn" id="4_66uy4"]
@ -48,8 +48,8 @@ tracks/0/keys = {
[sub_resource type="AnimationLibrary" id="AnimationLibrary_myv2j"]
_data = {
"RESET": SubResource("Animation_c8fnk"),
"flash": SubResource("Animation_ffxdv")
&"RESET": SubResource("Animation_c8fnk"),
&"flash": SubResource("Animation_ffxdv")
}
[node name="RuntimeGUI" type="Control" node_paths=PackedStringArray("SeedpacketsHotbar", "SunCounter")]
@ -134,5 +134,5 @@ metadata/_edit_lock_ = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="FastForwardEffect"]
libraries = {
"": SubResource("AnimationLibrary_myv2j")
&"": SubResource("AnimationLibrary_myv2j")
}

View file

@ -1,7 +1,7 @@
[gd_scene load_steps=4 format=3 uid="uid://devn21c7luf45"]
[ext_resource type="Shader" path="res://assets/shaders/greyscale.gdshader" id="1_d73yj"]
[ext_resource type="Script" path="res://scripts/components/level/PlantField.cs" id="2_84bqh"]
[ext_resource type="Shader" uid="uid://mt7vheq5modk" path="res://assets/shaders/greyscale.gdshader" id="1_d73yj"]
[ext_resource type="Script" uid="uid://bj7rw2f6qu1lg" path="res://scripts/components/level/PlantField.cs" id="2_84bqh"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_0miwm"]
shader = ExtResource("1_d73yj")

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://cg8713v6c5w15"]
[ext_resource type="Script" path="res://scripts/components/level/PoolContainer.cs" id="1_31ggc"]
[ext_resource type="Script" uid="uid://bso32xkw738sy" path="res://scripts/components/level/PoolContainer.cs" id="1_31ggc"]
[node name="Pools" type="Node2D" node_paths=PackedStringArray("Zombies", "Plants", "Projectiles", "Structures")]
script = ExtResource("1_31ggc")

View file

@ -0,0 +1,82 @@
[gd_scene load_steps=10 format=3 uid="uid://c1335fke4thpm"]
[ext_resource type="Script" uid="uid://bndu1h5kgcde8" path="res://scripts/components/level/RuntimeLevelData.cs" id="1_tnxdx"]
[ext_resource type="Texture2D" uid="uid://b0tb2hjum40aw" path="res://assets/sprites/background_summer.png" id="1_vafkg"]
[ext_resource type="Script" uid="uid://bso32xkw738sy" path="res://scripts/components/level/PoolContainer.cs" id="3_6128b"]
[ext_resource type="PackedScene" uid="uid://devn21c7luf45" path="res://scenes/level components/field_controller.tscn" id="4_ibntj"]
[ext_resource type="PackedScene" uid="uid://cfnmspei3k4p7" path="res://scenes/gui/runtime_gui.tscn" id="5_iotae"]
[ext_resource type="PackedScene" uid="uid://dpxxjfd5lv5sv" path="res://scenes/gui/choose_your_seeds.tscn" id="6_btfw3"]
[ext_resource type="Script" uid="uid://cslqjdd5wq4rc" path="res://scripts/components/level/SunSpawner.cs" id="7_gnb05"]
[ext_resource type="PackedScene" uid="uid://bpekho7leatr5" path="res://scenes/sun.tscn" id="8_8nyym"]
[ext_resource type="Script" uid="uid://bsuw5lvnr3kol" path="res://scripts/components/level/zombe_spawners/ZombieSequencer.cs" id="9_8nyym"]
[node name="PrototypeSurvival" type="Node2D"]
[node name="Data" type="Node" parent="."]
script = ExtResource("1_tnxdx")
SunCount = 50
[node name="Background" type="Sprite2D" parent="."]
position = Vector2(500, 200)
texture = ExtResource("1_vafkg")
metadata/_edit_lock_ = true
[node name="Camera2D" type="Camera2D" parent="."]
position = Vector2(481, 200)
metadata/_edit_lock_ = true
[node name="Pools" type="Node2D" parent="." node_paths=PackedStringArray("Zombies", "Plants", "Projectiles", "Structures")]
script = ExtResource("3_6128b")
Zombies = NodePath("Zombies")
Plants = NodePath("Plants")
Projectiles = NodePath("Projectiles")
Structures = NodePath("Structures")
[node name="Zombies" type="Node2D" parent="Pools"]
z_index = 3
y_sort_enabled = true
[node name="Plants" type="Node2D" parent="Pools"]
z_index = 1
y_sort_enabled = true
[node name="Projectiles" type="Node2D" parent="Pools"]
z_index = 4
y_sort_enabled = true
[node name="Structures" type="Node2D" parent="Pools"]
z_index = 2
y_sort_enabled = true
[node name="Overlay" type="CanvasLayer" parent="."]
layer = 6
follow_viewport_enabled = true
[node name="FieldController" parent="Overlay" instance=ExtResource("4_ibntj")]
[node name="GUI" type="CanvasLayer" parent="."]
layer = 10
[node name="RuntimeGUI" parent="GUI" instance=ExtResource("5_iotae")]
metadata/_edit_lock_ = true
[node name="ChooseYourSeeds" parent="GUI" instance=ExtResource("6_btfw3")]
metadata/_edit_lock_ = true
[node name="SunSpawner" type="Node" parent="."]
script = ExtResource("7_gnb05")
SunScene = ExtResource("8_8nyym")
[node name="Timer" type="Timer" parent="SunSpawner"]
wait_time = 15.0
[node name="ZombieSequencer" type="Node2D" parent="."]
position = Vector2(823, 0)
script = ExtResource("9_8nyym")
[node name="Timer" type="Timer" parent="ZombieSequencer"]
wait_time = 5.0
autostart = true
[connection signal="timeout" from="SunSpawner/Timer" to="SunSpawner" method="Spawn"]
[connection signal="timeout" from="ZombieSequencer/Timer" to="ZombieSequencer" method="FormSquad"]

View file

@ -1,7 +1,7 @@
[gd_scene load_steps=13 format=3 uid="uid://bpekho7leatr5"]
[ext_resource type="Shader" path="res://assets/shaders/shared_outline.gdshader" id="1_jcu1f"]
[ext_resource type="Script" path="res://scripts/Sun.cs" id="2_m8xcj"]
[ext_resource type="Shader" uid="uid://bk8uy5se3fo0" path="res://assets/shaders/shared_outline.gdshader" id="1_jcu1f"]
[ext_resource type="Script" uid="uid://qgeovvluk8yj" path="res://scripts/Sun.cs" id="2_m8xcj"]
[ext_resource type="Texture2D" uid="uid://bkmphus5wjadi" path="res://assets/sprites/atlases/sun_atlas.png" id="2_phn3y"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_u0o5k"]
@ -73,8 +73,8 @@ tracks/1/keys = {
[sub_resource type="AnimationLibrary" id="AnimationLibrary_juv2v"]
_data = {
"RESET": SubResource("Animation_jfrge"),
"main": SubResource("Animation_rvj0j")
&"RESET": SubResource("Animation_jfrge"),
&"main": SubResource("Animation_rvj0j")
}
[sub_resource type="Animation" id="Animation_t53pt"]
@ -108,8 +108,8 @@ tracks/0/keys = {
[sub_resource type="AnimationLibrary" id="AnimationLibrary_p7c0n"]
_data = {
"RESET": SubResource("Animation_t53pt"),
"main": SubResource("Animation_xyill")
&"RESET": SubResource("Animation_t53pt"),
&"main": SubResource("Animation_xyill")
}
[sub_resource type="CircleShape2D" id="CircleShape2D_7hl7x"]
@ -144,13 +144,13 @@ frame = 2
[node name="RotationAnimation" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_juv2v")
&"": SubResource("AnimationLibrary_juv2v")
}
autoplay = "main"
[node name="FadeAnimation" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_p7c0n")
&"": SubResource("AnimationLibrary_p7c0n")
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]