summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XSubstance.cs
blob: 5094b9bb9e8ca42b97f71462d0244dc41fc1a4a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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);
			}
		}
	}
}