1
This commit is contained in:
@@ -61,8 +61,8 @@ namespace BITKit.Entities
|
||||
}
|
||||
public record DamageMessage
|
||||
{
|
||||
public IEntity Initiator;
|
||||
public IEntity Target;
|
||||
public IUnityEntity Initiator;
|
||||
public IUnityEntity Target;
|
||||
public bool RawDamage;
|
||||
public int Damage;
|
||||
public IDamagable Hit;
|
||||
@@ -75,7 +75,7 @@ namespace BITKit.Entities
|
||||
}
|
||||
public interface IDamagable
|
||||
{
|
||||
IEntity Entity { get; }
|
||||
IUnityEntity UnityEntity { get; }
|
||||
Rigidbody Rigidbody { get; }
|
||||
void GiveDamage(DamageMessage message);
|
||||
}
|
||||
@@ -99,11 +99,6 @@ namespace BITKit.Entities
|
||||
damageMessage.Initiator?.Invoke(damageMessage);
|
||||
damageMessage.Target?.Invoke(damageMessage);
|
||||
|
||||
foreach (var x in damageMessage.Target?.GetCallbacks<IDamageCallback>()!)
|
||||
{
|
||||
x.OnGetDamage(damageMessage);
|
||||
}
|
||||
|
||||
OnEntityDamaged?.Invoke(damageMessage);
|
||||
if (heal.IsAlive is false)
|
||||
{
|
||||
|
Reference in New Issue
Block a user