22 lines
575 B
C#
22 lines
575 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using BITKit;
|
|
namespace BITKit.Entities
|
|
{
|
|
public class EntityHitbox : EntityBehavior,IDamagable
|
|
{
|
|
public IHealth Health => _health;
|
|
|
|
IUnityEntity IDamagable.UnityEntity => UnityEntity;
|
|
public Rigidbody Rigidbody => m_rigidbody;
|
|
public void GiveDamage(DamageMessage message)
|
|
{
|
|
UnityEntity.Invoke(message);
|
|
}
|
|
[SerializeField]private Rigidbody m_rigidbody;
|
|
|
|
[Inject]
|
|
private IHealth _health;
|
|
}
|
|
} |