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