Added splash damage

This commit is contained in:
2025-11-16 23:18:45 +03:00
parent 5adbdd6e54
commit cf7e6d13ef
19 changed files with 147 additions and 43 deletions
@@ -1,5 +1,5 @@
class_name MinelayerProjectile
extends AbstractProjectile
extends BlastProjectile
@export var deceleration : int
@@ -1,15 +1,10 @@
[gd_scene load_steps=8 format=3 uid="uid://4mkklqt1g14f"]
[gd_scene load_steps=9 format=3 uid="uid://4mkklqt1g14f"]
[ext_resource type="PackedScene" uid="uid://betr5ry5tc75e" path="res://game/entities/weapons/blast_projectile.tscn" id="1_ufc4r"]
[ext_resource type="Script" uid="uid://76swcukelnii" path="res://game/entities/weapons/minelayer/minelayer_projectile.gd" id="2_hwwfa"]
[ext_resource type="Script" uid="uid://dftb7hg5f06b5" path="res://game/health_system/damage/explosion_damage.gd" id="3_hll7s"]
[ext_resource type="Texture2D" uid="uid://oj86smpsipw4" path="res://images/projectiles.png" id="4_px1i2"]
[sub_resource type="Resource" id="Resource_px1i2"]
script = ExtResource("3_hll7s")
value = 100
metadata/_custom_type_script = "uid://dftb7hg5f06b5"
[sub_resource type="AtlasTexture" id="AtlasTexture_ckqco"]
atlas = ExtResource("4_px1i2")
region = Rect2(0, 16, 16, 16)
@@ -17,12 +12,19 @@ region = Rect2(0, 16, 16, 16)
[sub_resource type="CircleShape2D" id="CircleShape2D_ufc4r"]
radius = 7.0
[sub_resource type="Resource" id="Resource_ckqco"]
script = ExtResource("3_hll7s")
value = 100
metadata/_custom_type_script = "uid://dftb7hg5f06b5"
[sub_resource type="CircleShape2D" id="CircleShape2D_px1i2"]
radius = 48.0
[node name="MinelayerProjectile" instance=ExtResource("1_ufc4r")]
collision_layer = 0
collision_mask = 0
script = ExtResource("2_hwwfa")
deceleration = 100
damage = SubResource("Resource_px1i2")
speed = 200
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
@@ -31,7 +33,11 @@ texture = SubResource("AtlasTexture_ckqco")
[node name="CollisionShape2D" parent="." index="1"]
shape = SubResource("CircleShape2D_ufc4r")
[node name="LivetimeTimer" type="Timer" parent="." index="3"]
[node name="Blast" parent="." index="3"]
damage = SubResource("Resource_ckqco")
shape = SubResource("CircleShape2D_px1i2")
[node name="LivetimeTimer" type="Timer" parent="." index="4"]
wait_time = 60.0
one_shot = true
autostart = true