2023-06-05 19:57:17 +08:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using BITKit;
|
|
|
|
namespace BITKit.Entities
|
|
|
|
{
|
2023-11-06 01:17:23 +08:00
|
|
|
public class EntityHitbox : EntityBehavior,IDamagable
|
2023-06-05 19:57:17 +08:00
|
|
|
{
|
2023-11-06 01:17:23 +08:00
|
|
|
IUnityEntity IDamagable.UnityEntity => UnityEntity;
|
2023-06-05 19:57:17 +08:00
|
|
|
public Rigidbody Rigidbody => m_rigidbody;
|
2023-07-17 10:23:47 +08:00
|
|
|
public void GiveDamage(DamageMessage message)
|
|
|
|
{
|
2023-11-06 01:17:23 +08:00
|
|
|
UnityEntity.Invoke(message);
|
2023-07-17 10:23:47 +08:00
|
|
|
}
|
2023-10-24 23:38:22 +08:00
|
|
|
[SerializeField]private Rigidbody m_rigidbody;
|
2023-06-29 14:57:11 +08:00
|
|
|
|
2023-06-05 19:57:17 +08:00
|
|
|
}
|
|
|
|
}
|