diff options
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XDeath.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/XDeath.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/XDeath.cs b/Client/Assets/Scripts/XMainClient/XDeath.cs new file mode 100644 index 00000000..76c90069 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XDeath.cs @@ -0,0 +1,17 @@ +using System;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal sealed class XDeath : XSingleton<XDeath>
+ {
+ public void DeathDetect(XEntity entity, XEntity killer, bool bForce)
+ {
+ bool flag = bForce || entity.Attributes.GetAttr(XAttributeDefine.XAttr_CurrentHP_Basic) <= 0.0;
+ if (flag)
+ {
+ entity.TriggerDeath(killer);
+ }
+ }
+ }
+}
|