using System;
using System.Collections.Generic;
using Cpp2IlInjected;
using UnityEngine;

namespace XftWeapon
{
	// Token: 0x020003DA RID: 986
	[Token(Token = "0x20003DA")]
	public class XWeaponTrail : MonoBehaviour
	{
		// Token: 0x17000207 RID: 519
		// (get) Token: 0x060024CA RID: 9418 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x17000207")]
		public float UpdateInterval
		{
			[Token(Token = "0x60024CA")]
			[Address(RVA = "0x19C8180", Offset = "0x19C7180", VA = "0x1819C8180")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x17000208 RID: 520
		// (get) Token: 0x060024CB RID: 9419 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x17000208")]
		public Vector3 CurHeadPos
		{
			[Token(Token = "0x60024CB")]
			[Address(RVA = "0x19C80B0", Offset = "0x19C70B0", VA = "0x1819C80B0")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x17000209 RID: 521
		// (get) Token: 0x060024CC RID: 9420 RVA: 0x00056484 File Offset: 0x00054684
		[Token(Token = "0x17000209")]
		public float TrailWidth
		{
			[Token(Token = "0x60024CC")]
			[Address(RVA = "0xB8ED10", Offset = "0xB8DD10", VA = "0x180B8ED10")]
			get
			{
				return this.mTrailWidth;
			}
		}

		// Token: 0x060024CD RID: 9421 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60024CD")]
		[Address(RVA = "0x19C66C0", Offset = "0x19C56C0", VA = "0x1819C66C0")]
		public void Init()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060024CE RID: 9422 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60024CE")]
		[Address(RVA = "0x19C5E70", Offset = "0x19C4E70", VA = "0x1819C5E70")]
		public void Activate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060024CF RID: 9423 RVA: 0x00056498 File Offset: 0x00054698
		[Token(Token = "0x60024CF")]
		[Address(RVA = "0x19C61E0", Offset = "0x19C51E0", VA = "0x1819C61E0")]
		public void Deactivate()
		{
			this.mActivated = false;
			GameObject gameObject = base.gameObject;
			int num = 0;
			gameObject.SetActive(num != 0);
			VertexPool vertexPool = this.mVertexPool;
			int num2 = 0;
			vertexPool.SetMeshObjectActive(num2 != 0);
		}

		// Token: 0x060024D0 RID: 9424 RVA: 0x000564D4 File Offset: 0x000546D4
		[Token(Token = "0x60024D0")]
		[Address(RVA = "0x19C72B0", Offset = "0x19C62B0", VA = "0x1819C72B0")]
		public void StopSmoothly(float fadeTime)
		{
			this.mFadeTime = fadeTime;
			this.mIsFading = true;
		}

		// Token: 0x060024D1 RID: 9425 RVA: 0x000564F0 File Offset: 0x000546F0
		[Token(Token = "0x60024D1")]
		[Address(RVA = "0x19C6ED0", Offset = "0x19C5ED0", VA = "0x1819C6ED0")]
		private void OnEnable()
		{
			this.Activate();
		}

		// Token: 0x060024D2 RID: 9426 RVA: 0x00056504 File Offset: 0x00054704
		[Token(Token = "0x60024D2")]
		[Address(RVA = "0x19C61E0", Offset = "0x19C51E0", VA = "0x1819C61E0")]
		private void OnDisable()
		{
			this.mActivated = false;
			GameObject gameObject = base.gameObject;
			int num = 0;
			gameObject.SetActive(num != 0);
			VertexPool vertexPool = this.mVertexPool;
			int num2 = 0;
			vertexPool.SetMeshObjectActive(num2 != 0);
		}

		// Token: 0x060024D3 RID: 9427 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60024D3")]
		[Address(RVA = "0x19C7C10", Offset = "0x19C6C10", VA = "0x1819C7C10")]
		private void Update()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060024D4 RID: 9428 RVA: 0x00056540 File Offset: 0x00054740
		[Token(Token = "0x60024D4")]
		[Address(RVA = "0x19C6C40", Offset = "0x19C5C40", VA = "0x1819C6C40")]
		private void LateUpdate()
		{
			if (this.mInited)
			{
				this.mVertexPool.LateUpdate();
				return;
			}
		}

		// Token: 0x060024D5 RID: 9429 RVA: 0x00056568 File Offset: 0x00054768
		[Token(Token = "0x60024D5")]
		[Address(RVA = "0x19C6C70", Offset = "0x19C5C70", VA = "0x1819C6C70")]
		private void OnDestroy()
		{
			if (this.mInited)
			{
				VertexPool vertexPool = this.mVertexPool;
				if (vertexPool != 0)
				{
					vertexPool.Destroy();
					return;
				}
			}
		}

		// Token: 0x060024D6 RID: 9430 RVA: 0x00056590 File Offset: 0x00054790
		[Token(Token = "0x60024D6")]
		[Address(RVA = "0x19C72A0", Offset = "0x19C62A0", VA = "0x1819C72A0")]
		private void Start()
		{
			this.mInited = false;
			this.Init();
		}

		// Token: 0x060024D7 RID: 9431 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60024D7")]
		[Address(RVA = "0x19C6C90", Offset = "0x19C5C90", VA = "0x1819C6C90")]
		private void OnDrawGizmos()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060024D8 RID: 9432 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60024D8")]
		[Address(RVA = "0x19C64E0", Offset = "0x19C54E0", VA = "0x1819C64E0")]
		private void InitSpline()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060024D9 RID: 9433 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60024D9")]
		[Address(RVA = "0x19C7060", Offset = "0x19C6060", VA = "0x1819C7060")]
		private void RefreshSpline()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060024DA RID: 9434 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60024DA")]
		[Address(RVA = "0x19C7740", Offset = "0x19C6740", VA = "0x1819C7740")]
		private void UpdateVertex()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060024DB RID: 9435 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60024DB")]
		[Address(RVA = "0x19C7440", Offset = "0x19C6440", VA = "0x1819C7440")]
		private void UpdateIndices()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060024DC RID: 9436 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60024DC")]
		[Address(RVA = "0x19C7370", Offset = "0x19C6370", VA = "0x1819C7370")]
		private void UpdateHeadElem()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060024DD RID: 9437 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60024DD")]
		[Address(RVA = "0x19C72C0", Offset = "0x19C62C0", VA = "0x1819C72C0")]
		private void UpdateFade()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060024DE RID: 9438 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60024DE")]
		[Address(RVA = "0x19C6EE0", Offset = "0x19C5EE0", VA = "0x1819C6EE0")]
		private void RecordCurElem()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060024DF RID: 9439 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60024DF")]
		[Address(RVA = "0x19C62F0", Offset = "0x19C52F0", VA = "0x1819C62F0")]
		private void InitOriginalElements()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060024E0 RID: 9440 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60024E0")]
		[Address(RVA = "0x19C6230", Offset = "0x19C5230", VA = "0x1819C6230")]
		private void InitMeshObj()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060024E1 RID: 9441 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x60024E1")]
		[Address(RVA = "0x19C7F90", Offset = "0x19C6F90", VA = "0x1819C7F90")]
		public XWeaponTrail()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x060024E2 RID: 9442 RVA: 0x000565AC File Offset: 0x000547AC
		// Note: this type is marked as 'beforefieldinit'.
		[Token(Token = "0x60024E2")]
		[Address(RVA = "0x19C7F40", Offset = "0x19C6F40", VA = "0x1819C7F40")]
		static XWeaponTrail()
		{
			/*
An exception occurred when decompiling this method (060024E2)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void XftWeapon.XWeaponTrail::.cctor()

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stsfld:string(XWeaponTrail::Version, ldstr:string("1.3.1")); }; 
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
   --- End of inner exception stack trace ---
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
   at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
*/;
		}

		// Token: 0x04002E3F RID: 11839
		[Token(Token = "0x4002E3F")]
		public static string Version;

		// Token: 0x04002E40 RID: 11840
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4002E40")]
		public bool UseWith2D;

		// Token: 0x04002E41 RID: 11841
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4002E41")]
		public string SortingLayerName;

		// Token: 0x04002E42 RID: 11842
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4002E42")]
		public int SortingOrder;

		// Token: 0x04002E43 RID: 11843
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4002E43")]
		public Transform PointStart;

		// Token: 0x04002E44 RID: 11844
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4002E44")]
		public Transform PointEnd;

		// Token: 0x04002E45 RID: 11845
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4002E45")]
		public int MaxFrame;

		// Token: 0x04002E46 RID: 11846
		[FieldOffset(Offset = "0x44")]
		[Token(Token = "0x4002E46")]
		public int Granularity;

		// Token: 0x04002E47 RID: 11847
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4002E47")]
		public float Fps;

		// Token: 0x04002E48 RID: 11848
		[FieldOffset(Offset = "0x4C")]
		[Token(Token = "0x4002E48")]
		public Color MyColor;

		// Token: 0x04002E49 RID: 11849
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4002E49")]
		public Material MyMaterial;

		// Token: 0x04002E4A RID: 11850
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x4002E4A")]
		protected float mTrailWidth;

		// Token: 0x04002E4B RID: 11851
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4002E4B")]
		protected XWeaponTrail.Element mHeadElem;

		// Token: 0x04002E4C RID: 11852
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x4002E4C")]
		protected List<XWeaponTrail.Element> mSnapshotList;

		// Token: 0x04002E4D RID: 11853
		[FieldOffset(Offset = "0x80")]
		[Token(Token = "0x4002E4D")]
		protected XWeaponTrail.ElementPool mElemPool;

		// Token: 0x04002E4E RID: 11854
		[FieldOffset(Offset = "0x88")]
		[Token(Token = "0x4002E4E")]
		protected Spline mSpline;

		// Token: 0x04002E4F RID: 11855
		[FieldOffset(Offset = "0x90")]
		[Token(Token = "0x4002E4F")]
		protected float mFadeT;

		// Token: 0x04002E50 RID: 11856
		[FieldOffset(Offset = "0x94")]
		[Token(Token = "0x4002E50")]
		protected bool mIsFading;

		// Token: 0x04002E51 RID: 11857
		[FieldOffset(Offset = "0x98")]
		[Token(Token = "0x4002E51")]
		protected float mFadeTime;

		// Token: 0x04002E52 RID: 11858
		[FieldOffset(Offset = "0x9C")]
		[Token(Token = "0x4002E52")]
		protected float mElapsedTime;

		// Token: 0x04002E53 RID: 11859
		[FieldOffset(Offset = "0xA0")]
		[Token(Token = "0x4002E53")]
		protected float mFadeElapsedime;

		// Token: 0x04002E54 RID: 11860
		[FieldOffset(Offset = "0xA8")]
		[Token(Token = "0x4002E54")]
		protected GameObject mMeshObj;

		// Token: 0x04002E55 RID: 11861
		[FieldOffset(Offset = "0xB0")]
		[Token(Token = "0x4002E55")]
		protected VertexPool mVertexPool;

		// Token: 0x04002E56 RID: 11862
		[FieldOffset(Offset = "0xB8")]
		[Token(Token = "0x4002E56")]
		protected VertexPool.VertexSegment mVertexSegment;

		// Token: 0x04002E57 RID: 11863
		[FieldOffset(Offset = "0xC0")]
		[Token(Token = "0x4002E57")]
		protected bool mInited;

		// Token: 0x04002E58 RID: 11864
		[FieldOffset(Offset = "0xC1")]
		[Token(Token = "0x4002E58")]
		protected bool mActivated;

		// Token: 0x020003DB RID: 987
		[Token(Token = "0x20003DB")]
		public class Element
		{
			// Token: 0x1700020A RID: 522
			// (get) Token: 0x060024E3 RID: 9443 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x1700020A")]
			public Vector3 Pos
			{
				[Token(Token = "0x60024E3")]
				[Address(RVA = "0x6C7E70", Offset = "0x6C6E70", VA = "0x1806C7E70")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x060024E4 RID: 9444 RVA: 0x000565C4 File Offset: 0x000547C4
			[Token(Token = "0x60024E4")]
			[Address(RVA = "0x6C7E20", Offset = "0x6C6E20", VA = "0x1806C7E20")]
			public Element(Vector3 start, Vector3 end)
			{
				float z = start.z;
				this.PointStart.z = z;
				float z2 = end.z;
				this.PointEnd.z = z2;
			}

			// Token: 0x060024E5 RID: 9445 RVA: 0x00056600 File Offset: 0x00054800
			[Token(Token = "0x60024E5")]
			[Address(RVA = "0x36ABD0", Offset = "0x369BD0", VA = "0x18036ABD0")]
			public Element()
			{
			}

			// Token: 0x04002E59 RID: 11865
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4002E59")]
			public Vector3 PointStart;

			// Token: 0x04002E5A RID: 11866
			[FieldOffset(Offset = "0x1C")]
			[Token(Token = "0x4002E5A")]
			public Vector3 PointEnd;
		}

		// Token: 0x020003DC RID: 988
		[Token(Token = "0x20003DC")]
		public class ElementPool
		{
			// Token: 0x1700020B RID: 523
			// (get) Token: 0x060024E6 RID: 9446 RVA: 0x00056614 File Offset: 0x00054814
			// (set) Token: 0x060024E7 RID: 9447 RVA: 0x00056628 File Offset: 0x00054828
			[Token(Token = "0x1700020B")]
			public int CountAll
			{
				[Token(Token = "0x60024E6")]
				[Address(RVA = "0x29D0F0", Offset = "0x29C0F0", VA = "0x18029D0F0")]
				get;
				[Token(Token = "0x60024E7")]
				[Address(RVA = "0x29D100", Offset = "0x29C100", VA = "0x18029D100")]
				private set;
			}

			// Token: 0x1700020C RID: 524
			// (get) Token: 0x060024E8 RID: 9448 RVA: 0x0005663C File Offset: 0x0005483C
			[Token(Token = "0x1700020C")]
			public int CountActive
			{
				[Token(Token = "0x60024E8")]
				[Address(RVA = "0x6C7D90", Offset = "0x6C6D90", VA = "0x1806C7D90")]
				get
				{
					int num = this.<CountAll>k__BackingField;
					Stack<XWeaponTrail.Element> stack = this._stack;
					return num;
				}
			}

			// Token: 0x1700020D RID: 525
			// (get) Token: 0x060024E9 RID: 9449 RVA: 0x00056660 File Offset: 0x00054860
			[Token(Token = "0x1700020D")]
			public int CountInactive
			{
				[Token(Token = "0x60024E9")]
				[Address(RVA = "0x6C7DE0", Offset = "0x6C6DE0", VA = "0x1806C7DE0")]
				get
				{
					return this._stack._size;
				}
			}

			// Token: 0x060024EA RID: 9450 RVA: 0x00056680 File Offset: 0x00054880
			[Token(Token = "0x60024EA")]
			[Address(RVA = "0x6C7C90", Offset = "0x6C6C90", VA = "0x1806C7C90")]
			public ElementPool(int preCount)
			{
				Stack<XWeaponTrail.Element> stack = new Stack();
				this._stack = stack;
				base..ctor();
				int num = 0;
				if (preCount > 0)
				{
					XWeaponTrail.Element element = new XWeaponTrail.Element();
					this._stack.Push(element);
					num++;
				}
			}

			// Token: 0x060024EB RID: 9451 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x60024EB")]
			[Address(RVA = "0x6C7B20", Offset = "0x6C6B20", VA = "0x1806C7B20")]
			public XWeaponTrail.Element Get()
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x060024EC RID: 9452 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x60024EC")]
			[Address(RVA = "0x6C7BC0", Offset = "0x6C6BC0", VA = "0x1806C7BC0")]
			public void Release(XWeaponTrail.Element element)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x04002E5B RID: 11867
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4002E5B")]
			private readonly Stack<XWeaponTrail.Element> _stack;
		}
	}
}
