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/XSubstance.cs | 37 +++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XSubstance.cs (limited to 'Client/Assets/Scripts/XMainClient/XSubstance.cs') diff --git a/Client/Assets/Scripts/XMainClient/XSubstance.cs b/Client/Assets/Scripts/XMainClient/XSubstance.cs new file mode 100644 index 00000000..5094b9bb --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XSubstance.cs @@ -0,0 +1,37 @@ +using System; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class XSubstance : XEntity + { + public override bool Initilize(int flag) + { + this._eEntity_Type |= XEntity.EnitityType.Entity_Substance; + this._present = (XSingleton.singleton.CreateComponent(this, XPresentComponent.uuID) as XPresentComponent); + this._machine = (XSingleton.singleton.CreateComponent(this, XStateMachine.uuID) as XStateMachine); + XIdleComponent defaultState = XSingleton.singleton.CreateComponent(this, XIdleComponent.uuID) as XIdleComponent; + this._death = (XSingleton.singleton.CreateComponent(this, XDeathComponent.uuID) as XDeathComponent); + this._machine.SetDefaultState(defaultState); + bool flag2 = (flag & XFastEnumIntEqualityComparer.ToInt(XEntity.InitFlag.Entity_Transform)) == 0; + if (flag2) + { + this._net = (XSingleton.singleton.CreateComponent(this, XNetComponent.uuID) as XNetComponent); + } + return true; + } + + protected override void Move() + { + } + + public override void Died() + { + bool flag = this.Attributes.TypeID == 5001u; + if (flag) + { + XSingleton.singleton.DestroyEntity(this); + } + } + } +} -- cgit v1.1-26-g67d0