Added debris after ship destroying

This commit is contained in:
2025-12-22 00:34:32 +03:00
parent 927667bb0a
commit be793e50d7
21 changed files with 160 additions and 56 deletions
@@ -1,9 +1,10 @@
[gd_scene load_steps=7 format=3 uid="uid://dwsn0lf1e3578"]
[gd_scene load_steps=8 format=3 uid="uid://dwsn0lf1e3578"]
[ext_resource type="PackedScene" uid="uid://jvyagshykmgb" path="res://game/entities/ships/abstract_ship.tscn" id="1_28j6l"]
[ext_resource type="Script" uid="uid://byicf1t0807pq" path="res://game/entities/ships/enemies/abstract_enemy_ship.gd" id="2_fwvrd"]
[ext_resource type="Shader" uid="uid://dwh22f35u5qqi" path="res://game/entities/ships/shield.gdshader" id="3_6nnf4"]
[ext_resource type="Shader" uid="uid://dwh22f35u5qqi" path="res://game/shaders/shield.gdshader" id="3_6nnf4"]
[ext_resource type="PackedScene" uid="uid://bsqehbymixust" path="res://game/controllers/enemy_controller.tscn" id="3_l8c0n"]
[ext_resource type="Texture2D" uid="uid://nx7sl808ghaj" path="res://images/projectiles/debris_enemy.png" id="5_6nnf4"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_dlmr1"]
resource_local_to_scene = true
@@ -35,6 +36,9 @@ ship = NodePath("..")
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="." index="5"]
[node name="DebrisParticles" parent="." index="9"]
texture = ExtResource("5_6nnf4")
[connection signal="accelerate" from="EnemyController" to="." method="accelerate"]
[connection signal="screen_entered" from="VisibleOnScreenNotifier2D" to="." method="_on_visible_on_screen_notifier_2d_screen_entered"]
[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="_on_visible_on_screen_notifier_2d_screen_exited"]
@@ -3,7 +3,7 @@
[ext_resource type="PackedScene" uid="uid://dwsn0lf1e3578" path="res://game/entities/ships/enemies/abstract_enemy_ship.tscn" id="1_wvvpj"]
[ext_resource type="Script" uid="uid://cxomr1oojcrcl" path="res://game/entities/ships/enemies/heavy/heavy_enemy_ship.gd" id="2_3umer"]
[ext_resource type="Texture2D" uid="uid://5cgq8o5oqunq" path="res://images/ships/enemies/heavy.png" id="3_xqe8d"]
[ext_resource type="Shader" uid="uid://dwh22f35u5qqi" path="res://game/entities/ships/shield.gdshader" id="4_qawoi"]
[ext_resource type="Shader" uid="uid://dwh22f35u5qqi" path="res://game/shaders/shield.gdshader" id="4_qawoi"]
[sub_resource type="AtlasTexture" id="AtlasTexture_xqe8d"]
atlas = ExtResource("3_xqe8d")
@@ -58,7 +58,7 @@ rect = Rect2(-29, -21, 58, 42)
[node name="Health" parent="." index="6"]
max_hull = 200
[node name="HeathBar" parent="." index="7"]
[node name="HealthBar" parent="." index="7"]
offset_top = 27.0
offset_bottom = 27.0
@@ -70,3 +70,6 @@ position = Vector2(8, -16)
[node name="Third" type="Node2D" parent="WeaponSlots" index="2"]
position = Vector2(8, 16)
[node name="DebrisParticles" parent="." index="9"]
amount = 32
@@ -1,17 +1,32 @@
[gd_scene load_steps=7 format=3 uid="uid://cye5ndbh0ht7w"]
[gd_scene load_steps=10 format=3 uid="uid://cye5ndbh0ht7w"]
[ext_resource type="PackedScene" uid="uid://dwsn0lf1e3578" path="res://game/entities/ships/enemies/abstract_enemy_ship.tscn" id="1_16owb"]
[ext_resource type="Script" uid="uid://dcpqrdvp4nk82" path="res://game/entities/ships/enemies/medium/medium_enemy_ship.gd" id="2_dgwiy"]
[ext_resource type="Texture2D" uid="uid://dkwvm246s0wnd" path="res://images/ships/enemies/medium.png" id="3_d2xji"]
[ext_resource type="Shader" uid="uid://dwh22f35u5qqi" path="res://game/shaders/shield.gdshader" id="4_om3xa"]
[sub_resource type="AtlasTexture" id="AtlasTexture_d2xji"]
atlas = ExtResource("3_d2xji")
region = Rect2(0, 0, 48, 32)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_jorhn"]
resource_local_to_scene = true
shader = ExtResource("4_om3xa")
shader_parameter/speed = 0.0
shader_parameter/scale = 20.0
shader_parameter/intensity = 1.0
[sub_resource type="AtlasTexture" id="AtlasTexture_om3xa"]
atlas = ExtResource("3_d2xji")
region = Rect2(0, 32, 48, 32)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ren2c"]
resource_local_to_scene = true
shader = ExtResource("4_om3xa")
shader_parameter/speed = 5.0
shader_parameter/scale = 20.0
shader_parameter/intensity = 1.0
[sub_resource type="AtlasTexture" id="AtlasTexture_jorhn"]
atlas = ExtResource("3_d2xji")
region = Rect2(0, 64, 48, 32)
@@ -27,9 +42,11 @@ mass = 250
texture = SubResource("AtlasTexture_d2xji")
[node name="ArmorSprite" parent="." index="1"]
material = SubResource("ShaderMaterial_jorhn")
texture = SubResource("AtlasTexture_om3xa")
[node name="ShieldSprite" parent="." index="2"]
material = SubResource("ShaderMaterial_ren2c")
texture = SubResource("AtlasTexture_jorhn")
[node name="CollisionPolygon2D" parent="." index="3"]
@@ -41,7 +58,7 @@ rect = Rect2(-13, -21, 26, 42)
[node name="Health" parent="." index="6"]
max_hull = 100
[node name="HeathBar" parent="." index="7"]
[node name="HealthBar" parent="." index="7"]
offset_top = 19.0
offset_bottom = 19.0
@@ -50,3 +67,6 @@ position = Vector2(4, -8)
[node name="Second" type="Node2D" parent="WeaponSlots" index="1"]
position = Vector2(4, 8)
[node name="DebrisParticles" parent="." index="9"]
amount = 16
@@ -41,7 +41,7 @@ rect = Rect2(-13, -5, 26, 10)
[node name="Health" parent="." index="6"]
max_hull = 50
[node name="HeathBar" parent="." index="7"]
[node name="HealthBar" parent="." index="7"]
offset_top = 11.0
offset_bottom = 11.0