From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- Client/Assets/Scripts/XMainClient/XBoss.cs | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XBoss.cs (limited to 'Client/Assets/Scripts/XMainClient/XBoss.cs') diff --git a/Client/Assets/Scripts/XMainClient/XBoss.cs b/Client/Assets/Scripts/XMainClient/XBoss.cs new file mode 100644 index 00000000..bdd3b9a8 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XBoss.cs @@ -0,0 +1,43 @@ +using System; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal sealed class XBoss : XOpposer + { + public override bool Initilize(int flag) + { + base.Initilize(flag); + this._eEntity_Type |= XEntity.EnitityType.Entity_Boss; + this._layer = LayerMask.NameToLayer("BigGuy"); + bool flag2 = (flag & XFastEnumIntEqualityComparer.ToInt(XEntity.InitFlag.Entity_Transform)) == 0; + if (flag2) + { + this._qte = (XSingleton.singleton.CreateComponent(this, XQuickTimeEventComponent.uuID) as XQuickTimeEventComponent); + } + return true; + } + + public override void Dying() + { + base.Dying(); + } + + public override void OnDestroy() + { + bool flag = XSingleton.singleton.Boss == this; + if (flag) + { + XSingleton.singleton.Boss = null; + } + base.OnDestroy(); + } + + public override void OnCreated() + { + base.OnCreated(); + XSingleton.singleton.Boss = this; + } + } +} -- cgit v1.1-26-g67d0