1
This commit is contained in:
@@ -10,14 +10,12 @@ namespace BITKit.Entities
|
||||
{
|
||||
|
||||
public interface IDamageType { }
|
||||
|
||||
public interface IDamageService
|
||||
{
|
||||
public event Action<DamageMessage> OnEntityDamaged;
|
||||
public event Action<DamageMessage> OnEntityKilled;
|
||||
void Execute(DamageMessage damageMessage);
|
||||
}
|
||||
|
||||
public struct MeleeDamageMessage : IDamageType
|
||||
{
|
||||
public bool Bleeding;
|
||||
@@ -112,6 +110,7 @@ namespace BITKit.Entities
|
||||
}
|
||||
public interface IDamagable
|
||||
{
|
||||
string Tag { get; }
|
||||
IHealth Health { get; }
|
||||
IUnityEntity UnityEntity { get; }
|
||||
Rigidbody Rigidbody { get; }
|
||||
@@ -119,7 +118,7 @@ namespace BITKit.Entities
|
||||
}
|
||||
public class DamageService:MonoBehaviour,IDamageService
|
||||
{
|
||||
internal static IDamageService Singleton { get; set; }
|
||||
public static IDamageService Singleton { get;private set; }
|
||||
private readonly Queue<DamageMessage> Messages = new();
|
||||
|
||||
[SerializeReference,SubclassSelector] private INetClient netClient;
|
||||
|
Reference in New Issue
Block a user