2023-06-08 14:09:50 +08:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using BITKit;
|
|
|
|
namespace BITKit.Entities
|
|
|
|
{
|
2023-10-30 01:25:53 +08:00
|
|
|
public class EntityHitbox : EntityBehavior,IDamagable
|
2023-06-08 14:09:50 +08:00
|
|
|
{
|
2023-12-26 20:07:19 +08:00
|
|
|
public IHealth Health => _health;
|
|
|
|
|
2023-10-30 01:25:53 +08:00
|
|
|
IUnityEntity IDamagable.UnityEntity => UnityEntity;
|
2023-06-08 14:09:50 +08:00
|
|
|
public Rigidbody Rigidbody => m_rigidbody;
|
|
|
|
public void GiveDamage(DamageMessage message)
|
|
|
|
{
|
2023-10-30 01:25:53 +08:00
|
|
|
UnityEntity.Invoke(message);
|
2023-06-08 14:09:50 +08:00
|
|
|
}
|
2023-10-20 19:31:12 +08:00
|
|
|
[SerializeField]private Rigidbody m_rigidbody;
|
2023-12-26 20:07:19 +08:00
|
|
|
|
|
|
|
[Inject]
|
|
|
|
private IHealth _health;
|
2023-06-08 14:09:50 +08:00
|
|
|
}
|
|
|
|
}
|