This commit is contained in:
CortexCore
2024-05-31 01:23:15 +08:00
parent c798b224be
commit 299082fe27
164 changed files with 3604 additions and 2018 deletions

View File

@@ -27,10 +27,24 @@ namespace BITKit.Entities
}
public Rigidbody Rigidbody
{
get=>m_rigidbody;
get
{
EnsureConfigure();
return m_rigidbody;
}
set=>m_rigidbody=value;
}
public Collider Collider
{
get
{
EnsureConfigure();
return _collider;
}
}
private Collider _collider;
public void GiveDamage(DamageMessage message)
{
if (_unityEntity is not null)
@@ -53,6 +67,7 @@ namespace BITKit.Entities
_unityEntity = GetComponentInParent<IUnityEntity>(true);
_unityEntity?.Inject(this);
_initialized = true;
_collider = GetComponent<Collider>();
}
}
}