diff options
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);
+ }
+ }
+ }
+}
|