diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/XSubstance.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XSubstance.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/XSubstance.cs | 37 |
1 files changed, 37 insertions, 0 deletions
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<XComponentMgr>.singleton.CreateComponent(this, XPresentComponent.uuID) as XPresentComponent);
+ this._machine = (XSingleton<XComponentMgr>.singleton.CreateComponent(this, XStateMachine.uuID) as XStateMachine);
+ XIdleComponent defaultState = XSingleton<XComponentMgr>.singleton.CreateComponent(this, XIdleComponent.uuID) as XIdleComponent;
+ this._death = (XSingleton<XComponentMgr>.singleton.CreateComponent(this, XDeathComponent.uuID) as XDeathComponent);
+ this._machine.SetDefaultState(defaultState);
+ bool flag2 = (flag & XFastEnumIntEqualityComparer<XEntity.InitFlag>.ToInt(XEntity.InitFlag.Entity_Transform)) == 0;
+ if (flag2)
+ {
+ this._net = (XSingleton<XComponentMgr>.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<XEntityMgr>.singleton.DestroyEntity(this);
+ }
+ }
+ }
+}
|