removed obsolete interfaces for health and damage
This commit is contained in:
@@ -10,15 +10,15 @@ using Movementtests.interfaces;
|
||||
using Movementtests.tools;
|
||||
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_projectile.png"), Meta(typeof(IAutoNode))]
|
||||
public partial class Explosion : Area3D, IDamageDealer, IProvide<CuesManager>
|
||||
public partial class Explosion : Area3D, IProvide<CuesManager>
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
[Dependency]
|
||||
public CuesManager CuesManager => this.DependOn<CuesManager>();
|
||||
CuesManager IProvide<CuesManager>.Value() => CuesManager;
|
||||
|
||||
[Export] public RDamage RDamage { get; set; }
|
||||
|
||||
[Export] public float Damage { get; set; } = 1.0f;
|
||||
[Export] public float Radius { get; set; } = 1.0f;
|
||||
[Export] public float ExplosionTime { get; set; } = 0.2f;
|
||||
|
||||
@@ -47,7 +47,7 @@ public partial class Explosion : Area3D, IDamageDealer, IProvide<CuesManager>
|
||||
{
|
||||
if (body is not IForgeEntity target) continue;
|
||||
foreach (var ability in ForgeEntityNode.Abilities.GrantedAbilities.Where(ability => ability.CanActivate(out _, target)))
|
||||
ability.Activate(out _, target, RDamage.DamageDealt);
|
||||
ability.Activate(out _, target, Damage);
|
||||
}
|
||||
QueueFree();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://duju3atqgltkg"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cnlu64l7oxvv3" path="res://scenes/explosion/Explosion.cs" id="1_82hkh"]
|
||||
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="2_hys74"]
|
||||
[ext_resource type="Script" uid="uid://rpcbb54q4atx" path="res://forge/ForgeEntityNode.cs" id="3_wikc1"]
|
||||
[ext_resource type="Script" uid="uid://dps0oef50noil" path="res://addons/forge/nodes/ForgeEffect.cs" id="4_f5lqq"]
|
||||
[ext_resource type="Resource" uid="uid://nns16d5uhtl8" path="res://forge/resources/ability_datas/explosion_hit.tres" id="5_nphml"]
|
||||
@@ -12,12 +11,6 @@
|
||||
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="11_nqbbv"]
|
||||
[ext_resource type="Script" uid="uid://b3wo2uge4ddnj" path="res://addons/forge/resources/components/GrantAbility.cs" id="12_e6gfx"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ffdh3"]
|
||||
script = ExtResource("2_hys74")
|
||||
DamageDealt = 10.0
|
||||
DamageType = 3
|
||||
metadata/_custom_type_script = "uid://jitubgv6judn"
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_82hkh"]
|
||||
radius = 1.0
|
||||
|
||||
@@ -67,7 +60,6 @@ collision_layer = 0
|
||||
collision_mask = 16
|
||||
monitorable = false
|
||||
script = ExtResource("1_82hkh")
|
||||
RDamage = SubResource("Resource_ffdh3")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1259903749]
|
||||
shape = SubResource("SphereShape3D_82hkh")
|
||||
|
||||
Reference in New Issue
Block a user