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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user