Particles system

This commit is contained in:
Rendo 2025-06-28 02:44:42 +05:00
commit 0e5dee50f7
46 changed files with 643 additions and 200 deletions

View file

@ -1,10 +1,11 @@
[gd_scene load_steps=20 format=3 uid="uid://b5x35v3w2u8dx"]
[gd_scene load_steps=21 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="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/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" uid="uid://c7qfh4py0uulo" path="res://scripts/components/plants/behaviours/PotatomineBehaviour.cs" id="4_twx65"]
[ext_resource type="PackedScene" uid="uid://ckanq33rao1ur" path="res://scenes/particles/potato_explosion.tscn" id="5_px4r0"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_6uutc"]
animation = &"potato_mine/explode"
@ -96,6 +97,7 @@ collision_layer = 0
collision_mask = 8
script = ExtResource("3_2hd5y")
damage = 6000
particles = ExtResource("5_px4r0")
[node name="CollisionShape2D" type="CollisionShape2D" parent="ExplosionBox" index="0"]
position = Vector2(0, 9)

View file

@ -1,163 +0,0 @@
[gd_scene load_steps=13 format=3 uid="uid://c1ctn2bvt4cpq"]
[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_4k24j"]
[ext_resource type="Script" uid="uid://gvwhpjoame6m" path="res://scripts/components/gui/PauseMenu.cs" id="2_tifvb"]
[ext_resource type="AudioStream" uid="uid://co33ajpc1a1qm" path="res://assets/audio/zo.mp3" id="3_or0he"]
[sub_resource type="AtlasTexture" id="AtlasTexture_tifvb"]
atlas = ExtResource("1_4k24j")
region = Rect2(0, 0, 177, 174)
[sub_resource type="AtlasTexture" id="AtlasTexture_jd4l2"]
atlas = ExtResource("1_4k24j")
region = Rect2(177, 0, 42, 40)
[sub_resource type="LabelSettings" id="LabelSettings_or0he"]
font_size = 32
outline_size = 2
[sub_resource type="AtlasTexture" id="AtlasTexture_4k24j"]
atlas = ExtResource("1_4k24j")
region = Rect2(0, 221, 127, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_or0he"]
atlas = ExtResource("1_4k24j")
region = Rect2(255, 221, 118, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_y3stn"]
atlas = ExtResource("1_4k24j")
region = Rect2(194, 221, 61, 20)
[sub_resource type="Animation" id="Animation_2swbg"]
resource_name = "main"
length = 10.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Flower:position")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 5, 10),
"transitions": PackedFloat32Array(-2, -2, -2),
"update": 0,
"values": [Vector2(110, 7), Vector2(110, 7), Vector2(110, 7)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Flower:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 5, 10),
"transitions": PackedFloat32Array(-2, -2, -2),
"update": 0,
"values": [-0.352319, 0.330185, -0.352319]
}
[sub_resource type="Animation" id="Animation_miax1"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Flower:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(110, 7)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Flower:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [-0.352319]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ksc54"]
_data = {
&"RESET": SubResource("Animation_miax1"),
&"main": SubResource("Animation_2swbg")
}
[node name="Pause" type="NinePatchRect"]
process_mode = 3
anchors_preset = -1
anchor_left = 0.318333
anchor_top = 0.185
anchor_right = 0.755
anchor_bottom = 0.8325
texture = SubResource("AtlasTexture_tifvb")
patch_margin_left = 73
patch_margin_top = 98
patch_margin_right = 73
patch_margin_bottom = 52
script = ExtResource("2_tifvb")
metadata/_edit_use_anchors_ = true
[node name="Flower" type="TextureRect" parent="."]
z_index = -1
layout_mode = 1
anchors_preset = -1
anchor_left = 0.419848
anchor_top = 0.027027
anchor_right = 0.580153
anchor_bottom = 0.181467
rotation = -0.352319
pivot_offset = Vector2(21, 39)
texture = SubResource("AtlasTexture_jd4l2")
metadata/_edit_use_anchors_ = true
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 0
offset_left = 58.0002
offset_top = 69.0
offset_right = 209.0
offset_bottom = 246.0
[node name="Buttons" type="VBoxContainer" parent="HBoxContainer"]
layout_mode = 2
[node name="PAUSED" type="Label" parent="HBoxContainer/Buttons"]
layout_mode = 2
text = "PAUSED"
label_settings = SubResource("LabelSettings_or0he")
horizontal_alignment = 1
metadata/_edit_use_anchors_ = true
[node name="ContinueButton" type="Button" parent="HBoxContainer/Buttons"]
layout_mode = 2
icon = SubResource("AtlasTexture_4k24j")
[node name="RestartButton" type="Button" parent="HBoxContainer/Buttons"]
layout_mode = 2
icon = SubResource("AtlasTexture_or0he")
icon_alignment = 1
[node name="ExitButton" type="Button" parent="HBoxContainer/Buttons"]
layout_mode = 2
icon = SubResource("AtlasTexture_y3stn")
icon_alignment = 1
[node name="Audio" type="AudioStreamPlayer" parent="."]
stream = ExtResource("3_or0he")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_ksc54")
}
autoplay = "main"
[connection signal="pressed" from="HBoxContainer/Buttons/ContinueButton" to="." method="Continue"]
[connection signal="pressed" from="HBoxContainer/Buttons/RestartButton" to="." method="Restart"]
[connection signal="pressed" from="HBoxContainer/Buttons/ExitButton" to="." method="Exit"]

View file

@ -0,0 +1,93 @@
[gd_scene load_steps=9 format=3 uid="uid://fm471x22n8kr"]
[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_loim0"]
[ext_resource type="Script" uid="uid://gvwhpjoame6m" path="res://scripts/components/gui/PauseMenu.cs" id="2_4vp8g"]
[ext_resource type="AudioStream" uid="uid://co33ajpc1a1qm" path="res://assets/audio/zo.mp3" id="3_e3p60"]
[sub_resource type="AtlasTexture" id="AtlasTexture_tifvb"]
atlas = ExtResource("1_loim0")
region = Rect2(0, 0, 177, 174)
[sub_resource type="LabelSettings" id="LabelSettings_or0he"]
font_size = 32
outline_size = 2
[sub_resource type="AtlasTexture" id="AtlasTexture_4k24j"]
atlas = ExtResource("1_loim0")
region = Rect2(0, 221, 127, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_or0he"]
atlas = ExtResource("1_loim0")
region = Rect2(255, 221, 118, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_y3stn"]
atlas = ExtResource("1_loim0")
region = Rect2(194, 221, 61, 20)
[node name="PauseMenu" type="MarginContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 0
theme_override_constants/margin_left = 150
theme_override_constants/margin_top = 60
theme_override_constants/margin_right = 150
theme_override_constants/margin_bottom = 100
[node name="Pause" type="NinePatchRect" parent="."]
process_mode = 3
z_index = 1
layout_mode = 2
texture = SubResource("AtlasTexture_tifvb")
patch_margin_left = 73
patch_margin_top = 98
patch_margin_right = 73
patch_margin_bottom = 52
script = ExtResource("2_4vp8g")
metadata/_edit_use_anchors_ = true
[node name="MarginContainer" type="MarginContainer" parent="Pause"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 30
theme_override_constants/margin_top = 55
theme_override_constants/margin_right = 30
theme_override_constants/margin_bottom = 10
[node name="Buttons" type="VBoxContainer" parent="Pause/MarginContainer"]
layout_mode = 2
[node name="PAUSED" type="Label" parent="Pause/MarginContainer/Buttons"]
layout_mode = 2
text = "PAUSED"
label_settings = SubResource("LabelSettings_or0he")
horizontal_alignment = 1
metadata/_edit_use_anchors_ = true
[node name="ContinueButton" type="Button" parent="Pause/MarginContainer/Buttons"]
layout_mode = 2
icon = SubResource("AtlasTexture_4k24j")
icon_alignment = 1
[node name="RestartButton" type="Button" parent="Pause/MarginContainer/Buttons"]
layout_mode = 2
icon = SubResource("AtlasTexture_or0he")
icon_alignment = 1
[node name="ExitButton" type="Button" parent="Pause/MarginContainer/Buttons"]
layout_mode = 2
icon = SubResource("AtlasTexture_y3stn")
icon_alignment = 1
[node name="Audio" type="AudioStreamPlayer" parent="Pause"]
stream = ExtResource("3_e3p60")
[connection signal="pressed" from="Pause/MarginContainer/Buttons/ContinueButton" to="Pause" method="Continue"]
[connection signal="pressed" from="Pause/MarginContainer/Buttons/RestartButton" to="Pause" method="Restart"]
[connection signal="pressed" from="Pause/MarginContainer/Buttons/ExitButton" to="Pause" method="Exit"]

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=12 format=3 uid="uid://cfnmspei3k4p7"]
[gd_scene load_steps=13 format=3 uid="uid://cfnmspei3k4p7"]
[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"]
@ -7,6 +7,7 @@
[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"]
[ext_resource type="PackedScene" uid="uid://u5l3jd00s8vd" path="res://scenes/gui/pause_button.tscn" id="5_jyq78"]
[ext_resource type="PackedScene" uid="uid://b4lx8adw6rbqs" path="res://scenes/particles/dirt_explosion.tscn" id="6_5jtun"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ps2iw"]
texture = ExtResource("2_eg3hk")
@ -112,6 +113,7 @@ size_flags_horizontal = 3
layout_mode = 2
size_flags_horizontal = 1
size_flags_vertical = 4
particles = ExtResource("6_5jtun")
[node name="FastForwardButton" parent="MarginContainer/Control/Hotbar" node_paths=PackedStringArray("flashAnimator") instance=ExtResource("4_66uy4")]
layout_mode = 2

View file

@ -3,7 +3,7 @@
[ext_resource type="Texture2D" uid="uid://bhp3vuvwf7lak" path="res://assets/sprites/gui/suncounter.tres" id="1_e5x4k"]
[ext_resource type="Theme" uid="uid://b8l285cjcgeyi" path="res://resources/themes/GameStyle.tres" id="1_vhhcn"]
[ext_resource type="Texture2D" uid="uid://c47rflkf2wap0" path="res://assets/sprites/sun.tres" id="2_gugre"]
[ext_resource type="Script" path="res://scripts/components/gui/SunCounter.cs" id="3_qhmb8"]
[ext_resource type="Script" uid="uid://dwxohya1exdkh" path="res://scripts/components/gui/SunCounter.cs" id="3_qhmb8"]
[sub_resource type="LabelSettings" id="LabelSettings_lxkq5"]
font_size = 10
@ -34,6 +34,7 @@ offset_bottom = 22.487
texture = ExtResource("2_gugre")
[node name="Label" type="Label" parent="."]
process_mode = 3
layout_mode = 1
anchors_preset = -1
anchor_left = 0.122

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=4 format=3 uid="uid://devn21c7luf45"]
[gd_scene load_steps=5 format=3 uid="uid://devn21c7luf45"]
[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"]
[ext_resource type="PackedScene" uid="uid://b4lx8adw6rbqs" path="res://scenes/particles/dirt_explosion.tscn" id="3_ddnu6"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_0miwm"]
shader = ExtResource("1_d73yj")
@ -10,6 +11,7 @@ shader_parameter/amount = 0.0
[node name="FieldController" type="Node2D"]
material = SubResource("ShaderMaterial_0miwm")
script = ExtResource("2_84bqh")
particles = ExtResource("3_ddnu6")
[node name="Preview" type="Node2D" parent="."]
process_mode = 4

View file

@ -2,12 +2,13 @@
[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")]
[node name="Pools" type="Node2D" node_paths=PackedStringArray("Zombies", "Plants", "Projectiles", "Structures", "Particles")]
script = ExtResource("1_31ggc")
Zombies = NodePath("Zombies")
Plants = NodePath("Plants")
Projectiles = NodePath("Projectiles")
Structures = NodePath("Structures")
Particles = NodePath("Particles")
[node name="Zombies" type="Node2D" parent="."]
z_index = 3
@ -24,3 +25,5 @@ y_sort_enabled = true
[node name="Structures" type="Node2D" parent="."]
z_index = 2
y_sort_enabled = true
[node name="Particles" type="Node2D" parent="."]

View file

@ -0,0 +1,73 @@
[gd_scene load_steps=9 format=3 uid="uid://b4lx8adw6rbqs"]
[ext_resource type="Texture2D" uid="uid://d3673b2idj18b" path="res://assets/sprites/particles/dirt1.tres" id="1_nc6dt"]
[ext_resource type="Script" uid="uid://dxcd70o6aa7pr" path="res://scripts/components/particles/StandardParticles.cs" id="1_o2lv2"]
[ext_resource type="Material" uid="uid://dmpscw60bfrj" path="res://assets/sprites/particles/dirt_material.tres" id="2_o2lv2"]
[ext_resource type="Texture2D" uid="uid://bs8cll4gtgwr1" path="res://assets/sprites/particles/dirt2.tres" id="3_0gemy"]
[ext_resource type="Texture2D" uid="uid://0tja7r7yp1ht" path="res://assets/sprites/particles/dirt3.tres" id="4_ihbjc"]
[ext_resource type="Texture2D" uid="uid://conyd86prykef" path="res://assets/sprites/particles/dirt4.tres" id="5_hu2fb"]
[ext_resource type="Texture2D" uid="uid://u6vxm6gejoss" path="res://assets/sprites/particles/dirt5.tres" id="6_bwqux"]
[ext_resource type="Texture2D" uid="uid://biooadlxqqeos" path="res://assets/sprites/particles/dirt6.tres" id="7_ee6l0"]
[node name="DirtExplosion" type="Node2D"]
script = ExtResource("1_o2lv2")
[node name="First" type="GPUParticles2D" parent="."]
emitting = false
amount = 3
texture = ExtResource("1_nc6dt")
one_shot = true
explosiveness = 1.0
randomness = 0.11
local_coords = true
process_material = ExtResource("2_o2lv2")
[node name="Second" type="GPUParticles2D" parent="."]
emitting = false
amount = 3
texture = ExtResource("3_0gemy")
one_shot = true
explosiveness = 1.0
randomness = 0.11
local_coords = true
process_material = ExtResource("2_o2lv2")
[node name="Third" type="GPUParticles2D" parent="."]
emitting = false
amount = 3
texture = ExtResource("4_ihbjc")
one_shot = true
explosiveness = 1.0
randomness = 0.11
local_coords = true
process_material = ExtResource("2_o2lv2")
[node name="Fourth" type="GPUParticles2D" parent="."]
emitting = false
amount = 3
texture = ExtResource("5_hu2fb")
one_shot = true
explosiveness = 1.0
randomness = 0.11
local_coords = true
process_material = ExtResource("2_o2lv2")
[node name="Fifth" type="GPUParticles2D" parent="."]
emitting = false
amount = 3
texture = ExtResource("6_bwqux")
one_shot = true
explosiveness = 1.0
randomness = 0.11
local_coords = true
process_material = ExtResource("2_o2lv2")
[node name="Sixth" type="GPUParticles2D" parent="."]
emitting = false
amount = 3
texture = ExtResource("7_ee6l0")
one_shot = true
explosiveness = 1.0
randomness = 0.11
local_coords = true
process_material = ExtResource("2_o2lv2")

View file

@ -0,0 +1,36 @@
[gd_scene load_steps=6 format=3 uid="uid://1d33w4ubtury"]
[ext_resource type="Script" uid="uid://dxcd70o6aa7pr" path="res://scripts/components/particles/StandardParticles.cs" id="1_rhijc"]
[ext_resource type="Texture2D" uid="uid://d1ovwgd03fxx5" path="res://assets/sprites/particles/pea_fragment1.tres" id="1_wg12m"]
[ext_resource type="Material" uid="uid://0sf0uy1dkxb6" path="res://assets/sprites/particles/pea_material.tres" id="2_rhijc"]
[ext_resource type="Texture2D" uid="uid://bmig582h4s38v" path="res://assets/sprites/particles/pea_fragment2.tres" id="3_yroe6"]
[ext_resource type="Texture2D" uid="uid://cg3nx7qj8kbkw" path="res://assets/sprites/particles/pea_fragment3.tres" id="4_bbhkw"]
[node name="PeaParticles" type="Node2D"]
script = ExtResource("1_rhijc")
[node name="First" type="GPUParticles2D" parent="."]
emitting = false
amount = 1
texture = ExtResource("1_wg12m")
one_shot = true
explosiveness = 1.0
process_material = ExtResource("2_rhijc")
[node name="Second" type="GPUParticles2D" parent="."]
emitting = false
amount = 1
texture = ExtResource("3_yroe6")
one_shot = true
explosiveness = 1.0
randomness = 0.15
process_material = ExtResource("2_rhijc")
[node name="Third" type="GPUParticles2D" parent="."]
emitting = false
amount = 1
texture = ExtResource("4_bbhkw")
one_shot = true
explosiveness = 1.0
randomness = 0.15
process_material = ExtResource("2_rhijc")

View file

@ -0,0 +1,54 @@
[gd_scene load_steps=7 format=3 uid="uid://ckanq33rao1ur"]
[ext_resource type="PackedScene" uid="uid://b4lx8adw6rbqs" path="res://scenes/particles/dirt_explosion.tscn" id="1_c4q5e"]
[ext_resource type="Texture2D" uid="uid://cad45iyh16x5g" path="res://assets/sprites/particles/nachinka1.tres" id="2_lgu5b"]
[ext_resource type="Material" uid="uid://dvjxab8lnj6ap" path="res://assets/sprites/particles/potato_material.tres" id="3_lgu5b"]
[ext_resource type="Texture2D" uid="uid://b3yfl2had6t3o" path="res://assets/sprites/particles/nachinka2.tres" id="4_xwh7c"]
[ext_resource type="Texture2D" uid="uid://e5v4vpux4h8k" path="res://assets/sprites/particles/nachinka3.tres" id="5_ryjsf"]
[ext_resource type="Texture2D" uid="uid://dny6mfpspd3o8" path="res://assets/sprites/particles/nachinka4.tres" id="6_ursbv"]
[node name="PotatoExplosion" instance=ExtResource("1_c4q5e")]
[node name="Nachinka" type="GPUParticles2D" parent="." index="6"]
emitting = false
amount = 2
texture = ExtResource("2_lgu5b")
lifetime = 2.0
one_shot = true
explosiveness = 1.0
randomness = 0.11
local_coords = true
process_material = ExtResource("3_lgu5b")
[node name="Nachinka2" type="GPUParticles2D" parent="." index="7"]
emitting = false
amount = 2
texture = ExtResource("4_xwh7c")
lifetime = 2.0
one_shot = true
explosiveness = 1.0
randomness = 0.11
local_coords = true
process_material = ExtResource("3_lgu5b")
[node name="Nachinka3" type="GPUParticles2D" parent="." index="8"]
emitting = false
amount = 2
texture = ExtResource("5_ryjsf")
lifetime = 2.0
one_shot = true
explosiveness = 1.0
randomness = 0.11
local_coords = true
process_material = ExtResource("3_lgu5b")
[node name="Nachinka4" type="GPUParticles2D" parent="." index="9"]
emitting = false
amount = 2
texture = ExtResource("6_ursbv")
lifetime = 2.0
one_shot = true
explosiveness = 1.0
randomness = 0.11
local_coords = true
process_material = ExtResource("3_lgu5b")

View file

@ -0,0 +1,17 @@
[gd_scene load_steps=5 format=3 uid="uid://cijchi3f01q2t"]
[ext_resource type="PackedScene" uid="uid://1d33w4ubtury" path="res://scenes/particles/pea_particles.tscn" id="1_5fx7g"]
[ext_resource type="Texture2D" uid="uid://el3weu727cmo" path="res://assets/sprites/particles/snowpea_fragment1.tres" id="2_fb47t"]
[ext_resource type="Texture2D" uid="uid://rv2ibl8ls1kh" path="res://assets/sprites/particles/snowpea_fragment2.tres" id="3_5frrb"]
[ext_resource type="Texture2D" uid="uid://bgg1n8802ebm6" path="res://assets/sprites/particles/snowpea_fragment3.tres" id="4_hwfh3"]
[node name="SnowPeaParticles" instance=ExtResource("1_5fx7g")]
[node name="First" parent="." index="0"]
texture = ExtResource("2_fb47t")
[node name="Second" parent="." index="1"]
texture = ExtResource("3_5frrb")
[node name="Third" parent="." index="2"]
texture = ExtResource("4_hwfh3")

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=4 format=3 uid="uid://b2hrv0aqbui7u"]
[gd_scene load_steps=5 format=3 uid="uid://b2hrv0aqbui7u"]
[ext_resource type="Script" uid="uid://dxlwvwy3hj56x" path="res://scripts/components/LinearProjectile.cs" id="1_3kc4s"]
[ext_resource type="Texture2D" uid="uid://dq0mul65hevtt" path="res://assets/sprites/plants/pea.tres" id="2_26q5x"]
[ext_resource type="PackedScene" uid="uid://1d33w4ubtury" path="res://scenes/particles/pea_particles.tscn" id="2_osqrk"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ix1sk"]
radius = 6.0
@ -12,6 +13,7 @@ collision_mask = 8
script = ExtResource("1_3kc4s")
_speed = 3.0
_damage = 10
particles = ExtResource("2_osqrk")
[node name="Sprite" type="Sprite2D" parent="."]
texture = ExtResource("2_26q5x")

View file

@ -1,8 +1,12 @@
[gd_scene load_steps=5 format=3 uid="uid://domeukw4ucmyr"]
[gd_scene load_steps=9 format=3 uid="uid://domeukw4ucmyr"]
[ext_resource type="Script" uid="uid://dxlwvwy3hj56x" path="res://scripts/components/LinearProjectile.cs" id="1_fkydi"]
[ext_resource type="Resource" uid="uid://7uj0oe656jfx" path="res://resources/effects/SnowSlow.tres" id="2_fn62x"]
[ext_resource type="Texture2D" uid="uid://dn4l67snkx5mr" path="res://assets/sprites/plants/snowpea_projectile.tres" id="2_xt8td"]
[ext_resource type="PackedScene" uid="uid://cijchi3f01q2t" path="res://scenes/particles/snow_pea_particles.tscn" id="3_t6hp0"]
[ext_resource type="Texture2D" uid="uid://dejgsyw4f2crg" path="res://assets/sprites/particles/snowpea_flake1.tres" id="5_1u1j3"]
[ext_resource type="Material" uid="uid://bflocbxbpv73j" path="res://assets/sprites/particles/snowflake.tres" id="6_pcdfd"]
[ext_resource type="Texture2D" uid="uid://deiu2jr26meq" path="res://assets/sprites/particles/snowpea_flake2.tres" id="7_xke8y"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ix1sk"]
radius = 6.0
@ -15,6 +19,7 @@ _speed = 3.0
_damage = 10
_impactEffect = ExtResource("2_fn62x")
_damageType = 1
particles = ExtResource("3_t6hp0")
[node name="Sprite" type="Sprite2D" parent="."]
texture = ExtResource("2_xt8td")
@ -27,5 +32,24 @@ wait_time = 15.0
one_shot = true
autostart = true
[node name="Particles1" type="GPUParticles2D" parent="."]
position = Vector2(-5, 0)
amount = 1
texture = ExtResource("5_1u1j3")
process_material = ExtResource("6_pcdfd")
[node name="Particles2" type="GPUParticles2D" parent="."]
position = Vector2(5, 0)
emitting = false
amount = 1
texture = ExtResource("7_xke8y")
process_material = ExtResource("6_pcdfd")
[node name="Timer" type="Timer" parent="Particles2"]
wait_time = 0.2
one_shot = true
autostart = true
[connection signal="area_entered" from="." to="." method="OnAreaEntered"]
[connection signal="timeout" from="Timer" to="." method="queue_free"]
[connection signal="timeout" from="Particles2/Timer" to="Particles2" method="set_emitting" binds= [true]]

View file

@ -6,7 +6,7 @@
[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="PackedScene" uid="uid://c1ctn2bvt4cpq" path="res://scenes/gui/pause.tscn" id="7_3ghv7"]
[ext_resource type="PackedScene" uid="uid://fm471x22n8kr" path="res://scenes/gui/pause_menu.tscn" id="7_3ghv7"]
[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"]
@ -37,12 +37,13 @@ metadata/_edit_lock_ = true
position = Vector2(481, 200)
metadata/_edit_lock_ = true
[node name="Pools" type="Node2D" parent="." node_paths=PackedStringArray("Zombies", "Plants", "Projectiles", "Structures")]
[node name="Pools" type="Node2D" parent="." node_paths=PackedStringArray("Zombies", "Plants", "Projectiles", "Structures", "Particles")]
script = ExtResource("3_6128b")
Zombies = NodePath("Zombies")
Plants = NodePath("Plants")
Projectiles = NodePath("Projectiles")
Structures = NodePath("Structures")
Particles = NodePath("Particles")
[node name="Zombies" type="Node2D" parent="Pools"]
z_index = 3
@ -60,6 +61,9 @@ y_sort_enabled = true
z_index = 2
y_sort_enabled = true
[node name="Particles" type="Node2D" parent="Pools"]
z_index = 5
[node name="Overlay" type="CanvasLayer" parent="."]
layer = 6
follow_viewport_enabled = true
@ -75,7 +79,7 @@ metadata/_edit_lock_ = true
[node name="ChooseYourSeeds" parent="GUI" instance=ExtResource("6_btfw3")]
metadata/_edit_lock_ = true
[node name="Pause" parent="GUI" instance=ExtResource("7_3ghv7")]
[node name="PauseMenu" parent="GUI" instance=ExtResource("7_3ghv7")]
visible = false
[node name="SunSpawner" type="Node" parent="."]