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

namespace XftWeapon
{
	// Token: 0x02000382 RID: 898
	[Token(Token = "0x2000382")]
	public class XWeaponTrail : MonoBehaviour
	{
		// Token: 0x170001E2 RID: 482
		// (get) Token: 0x06002201 RID: 8705 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170001E2")]
		public float UpdateInterval
		{
			[Token(Token = "0x6002201")]
			[Address(RVA = "0x949C60", Offset = "0x948A60", VA = "0x180949C60")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170001E3 RID: 483
		// (get) Token: 0x06002202 RID: 8706 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x170001E3")]
		public Vector3 CurHeadPos
		{
			[Token(Token = "0x6002202")]
			[Address(RVA = "0x949B80", Offset = "0x948980", VA = "0x180949B80")]
			get
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}
		}

		// Token: 0x170001E4 RID: 484
		// (get) Token: 0x06002203 RID: 8707 RVA: 0x0004F1E8 File Offset: 0x0004D3E8
		[Token(Token = "0x170001E4")]
		public float TrailWidth
		{
			[Token(Token = "0x6002203")]
			[Address(RVA = "0x949C50", Offset = "0x948A50", VA = "0x180949C50")]
			get
			{
				return this.mTrailWidth;
			}
		}

		// Token: 0x06002204 RID: 8708 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002204")]
		[Address(RVA = "0x948190", Offset = "0x946F90", VA = "0x180948190")]
		public void Init()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002205 RID: 8709 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002205")]
		[Address(RVA = "0x947940", Offset = "0x946740", VA = "0x180947940")]
		public void Activate()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002206 RID: 8710 RVA: 0x0004F1FC File Offset: 0x0004D3FC
		[Token(Token = "0x6002206")]
		[Address(RVA = "0x947CB0", Offset = "0x946AB0", VA = "0x180947CB0")]
		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: 0x06002207 RID: 8711 RVA: 0x0004F238 File Offset: 0x0004D438
		[Token(Token = "0x6002207")]
		[Address(RVA = "0x948D80", Offset = "0x947B80", VA = "0x180948D80")]
		public void StopSmoothly(float fadeTime)
		{
			this.mFadeTime = fadeTime;
			this.mIsFading = true;
		}

		// Token: 0x06002208 RID: 8712 RVA: 0x0004F254 File Offset: 0x0004D454
		[Token(Token = "0x6002208")]
		[Address(RVA = "0x9489A0", Offset = "0x9477A0", VA = "0x1809489A0")]
		private void OnEnable()
		{
			this.Activate();
		}

		// Token: 0x06002209 RID: 8713 RVA: 0x0004F268 File Offset: 0x0004D468
		[Token(Token = "0x6002209")]
		[Address(RVA = "0x947CB0", Offset = "0x946AB0", VA = "0x180947CB0")]
		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: 0x0600220A RID: 8714 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600220A")]
		[Address(RVA = "0x9496E0", Offset = "0x9484E0", VA = "0x1809496E0")]
		private void Update()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600220B RID: 8715 RVA: 0x0004F2A4 File Offset: 0x0004D4A4
		[Token(Token = "0x600220B")]
		[Address(RVA = "0x948710", Offset = "0x947510", VA = "0x180948710")]
		private void LateUpdate()
		{
			if (this.mInited)
			{
				this.mVertexPool.LateUpdate();
				return;
			}
		}

		// Token: 0x0600220C RID: 8716 RVA: 0x0004F2CC File Offset: 0x0004D4CC
		[Token(Token = "0x600220C")]
		[Address(RVA = "0x948740", Offset = "0x947540", VA = "0x180948740")]
		private void OnDestroy()
		{
			if (this.mInited)
			{
				VertexPool vertexPool = this.mVertexPool;
				if (vertexPool != 0)
				{
					vertexPool.Destroy();
					return;
				}
			}
		}

		// Token: 0x0600220D RID: 8717 RVA: 0x0004F2F4 File Offset: 0x0004D4F4
		[Token(Token = "0x600220D")]
		[Address(RVA = "0x948D70", Offset = "0x947B70", VA = "0x180948D70")]
		private void Start()
		{
			this.mInited = false;
			this.Init();
		}

		// Token: 0x0600220E RID: 8718 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600220E")]
		[Address(RVA = "0x948760", Offset = "0x947560", VA = "0x180948760")]
		private void OnDrawGizmos()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600220F RID: 8719 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600220F")]
		[Address(RVA = "0x947FB0", Offset = "0x946DB0", VA = "0x180947FB0")]
		private void InitSpline()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002210 RID: 8720 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002210")]
		[Address(RVA = "0x948B30", Offset = "0x947930", VA = "0x180948B30")]
		private void RefreshSpline()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002211 RID: 8721 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002211")]
		[Address(RVA = "0x949210", Offset = "0x948010", VA = "0x180949210")]
		private void UpdateVertex()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002212 RID: 8722 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002212")]
		[Address(RVA = "0x948F10", Offset = "0x947D10", VA = "0x180948F10")]
		private void UpdateIndices()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002213 RID: 8723 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002213")]
		[Address(RVA = "0x948E40", Offset = "0x947C40", VA = "0x180948E40")]
		private void UpdateHeadElem()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002214 RID: 8724 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002214")]
		[Address(RVA = "0x948D90", Offset = "0x947B90", VA = "0x180948D90")]
		private void UpdateFade()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002215 RID: 8725 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002215")]
		[Address(RVA = "0x9489B0", Offset = "0x9477B0", VA = "0x1809489B0")]
		private void RecordCurElem()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002216 RID: 8726 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002216")]
		[Address(RVA = "0x947DC0", Offset = "0x946BC0", VA = "0x180947DC0")]
		private void InitOriginalElements()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002217 RID: 8727 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002217")]
		[Address(RVA = "0x947D00", Offset = "0x946B00", VA = "0x180947D00")]
		private void InitMeshObj()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002218 RID: 8728 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002218")]
		[Address(RVA = "0x949A60", Offset = "0x948860", VA = "0x180949A60")]
		public XWeaponTrail()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002219 RID: 8729 RVA: 0x0004F310 File Offset: 0x0004D510
		// Note: this type is marked as 'beforefieldinit'.
		[Token(Token = "0x6002219")]
		[Address(RVA = "0x949A10", Offset = "0x948810", VA = "0x180949A10")]
		static XWeaponTrail()
		{
			/*
An exception occurred when decompiling this method (06002219)

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: 0x04002B55 RID: 11093
		[Token(Token = "0x4002B55")]
		public static string Version;

		// Token: 0x04002B56 RID: 11094
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4002B56")]
		public bool UseWith2D;

		// Token: 0x04002B57 RID: 11095
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4002B57")]
		public string SortingLayerName;

		// Token: 0x04002B58 RID: 11096
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4002B58")]
		public int SortingOrder;

		// Token: 0x04002B59 RID: 11097
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4002B59")]
		public Transform PointStart;

		// Token: 0x04002B5A RID: 11098
		[FieldOffset(Offset = "0x38")]
		[Token(Token = "0x4002B5A")]
		public Transform PointEnd;

		// Token: 0x04002B5B RID: 11099
		[FieldOffset(Offset = "0x40")]
		[Token(Token = "0x4002B5B")]
		public int MaxFrame;

		// Token: 0x04002B5C RID: 11100
		[FieldOffset(Offset = "0x44")]
		[Token(Token = "0x4002B5C")]
		public int Granularity;

		// Token: 0x04002B5D RID: 11101
		[FieldOffset(Offset = "0x48")]
		[Token(Token = "0x4002B5D")]
		public float Fps;

		// Token: 0x04002B5E RID: 11102
		[FieldOffset(Offset = "0x4C")]
		[Token(Token = "0x4002B5E")]
		public Color MyColor;

		// Token: 0x04002B5F RID: 11103
		[FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4002B5F")]
		public Material MyMaterial;

		// Token: 0x04002B60 RID: 11104
		[FieldOffset(Offset = "0x68")]
		[Token(Token = "0x4002B60")]
		protected float mTrailWidth;

		// Token: 0x04002B61 RID: 11105
		[FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4002B61")]
		protected XWeaponTrail.Element mHeadElem;

		// Token: 0x04002B62 RID: 11106
		[FieldOffset(Offset = "0x78")]
		[Token(Token = "0x4002B62")]
		protected List<XWeaponTrail.Element> mSnapshotList;

		// Token: 0x04002B63 RID: 11107
		[FieldOffset(Offset = "0x80")]
		[Token(Token = "0x4002B63")]
		protected XWeaponTrail.ElementPool mElemPool;

		// Token: 0x04002B64 RID: 11108
		[FieldOffset(Offset = "0x88")]
		[Token(Token = "0x4002B64")]
		protected Spline mSpline;

		// Token: 0x04002B65 RID: 11109
		[FieldOffset(Offset = "0x90")]
		[Token(Token = "0x4002B65")]
		protected float mFadeT;

		// Token: 0x04002B66 RID: 11110
		[FieldOffset(Offset = "0x94")]
		[Token(Token = "0x4002B66")]
		protected bool mIsFading;

		// Token: 0x04002B67 RID: 11111
		[FieldOffset(Offset = "0x98")]
		[Token(Token = "0x4002B67")]
		protected float mFadeTime;

		// Token: 0x04002B68 RID: 11112
		[FieldOffset(Offset = "0x9C")]
		[Token(Token = "0x4002B68")]
		protected float mElapsedTime;

		// Token: 0x04002B69 RID: 11113
		[FieldOffset(Offset = "0xA0")]
		[Token(Token = "0x4002B69")]
		protected float mFadeElapsedime;

		// Token: 0x04002B6A RID: 11114
		[FieldOffset(Offset = "0xA8")]
		[Token(Token = "0x4002B6A")]
		protected GameObject mMeshObj;

		// Token: 0x04002B6B RID: 11115
		[FieldOffset(Offset = "0xB0")]
		[Token(Token = "0x4002B6B")]
		protected VertexPool mVertexPool;

		// Token: 0x04002B6C RID: 11116
		[FieldOffset(Offset = "0xB8")]
		[Token(Token = "0x4002B6C")]
		protected VertexPool.VertexSegment mVertexSegment;

		// Token: 0x04002B6D RID: 11117
		[FieldOffset(Offset = "0xC0")]
		[Token(Token = "0x4002B6D")]
		protected bool mInited;

		// Token: 0x04002B6E RID: 11118
		[FieldOffset(Offset = "0xC1")]
		[Token(Token = "0x4002B6E")]
		protected bool mActivated;

		// Token: 0x02000383 RID: 899
		[Token(Token = "0x2000383")]
		public class Element
		{
			// Token: 0x170001E5 RID: 485
			// (get) Token: 0x0600221A RID: 8730 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x170001E5")]
			public Vector3 Pos
			{
				[Token(Token = "0x600221A")]
				[Address(RVA = "0x132CBE0", Offset = "0x132B9E0", VA = "0x18132CBE0")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x0600221B RID: 8731 RVA: 0x0004F328 File Offset: 0x0004D528
			[Token(Token = "0x600221B")]
			[Address(RVA = "0x132CB90", Offset = "0x132B990", VA = "0x18132CB90")]
			public Element(Vector3 start, Vector3 end)
			{
				float z = start.z;
				this.PointStart.z = z;
				float z2 = end.z;
				this.PointEnd.z = z2;
			}

			// Token: 0x0600221C RID: 8732 RVA: 0x0004F364 File Offset: 0x0004D564
			[Token(Token = "0x600221C")]
			[Address(RVA = "0x3D8B20", Offset = "0x3D7920", VA = "0x1803D8B20")]
			public Element()
			{
			}

			// Token: 0x04002B6F RID: 11119
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4002B6F")]
			public Vector3 PointStart;

			// Token: 0x04002B70 RID: 11120
			[FieldOffset(Offset = "0x1C")]
			[Token(Token = "0x4002B70")]
			public Vector3 PointEnd;
		}

		// Token: 0x02000384 RID: 900
		[Token(Token = "0x2000384")]
		public class ElementPool
		{
			// Token: 0x170001E6 RID: 486
			// (get) Token: 0x0600221D RID: 8733 RVA: 0x0004F378 File Offset: 0x0004D578
			// (set) Token: 0x0600221E RID: 8734 RVA: 0x0004F38C File Offset: 0x0004D58C
			[Token(Token = "0x170001E6")]
			public int CountAll
			{
				[Token(Token = "0x600221D")]
				[Address(RVA = "0x296740", Offset = "0x295540", VA = "0x180296740")]
				get;
				[Token(Token = "0x600221E")]
				[Address(RVA = "0x296750", Offset = "0x295550", VA = "0x180296750")]
				private set;
			}

			// Token: 0x170001E7 RID: 487
			// (get) Token: 0x0600221F RID: 8735 RVA: 0x0004F3A0 File Offset: 0x0004D5A0
			[Token(Token = "0x170001E7")]
			public int CountActive
			{
				[Token(Token = "0x600221F")]
				[Address(RVA = "0x132CB00", Offset = "0x132B900", VA = "0x18132CB00")]
				get
				{
					int num = this.<CountAll>k__BackingField;
					Stack<XWeaponTrail.Element> stack = this._stack;
					return num;
				}
			}

			// Token: 0x170001E8 RID: 488
			// (get) Token: 0x06002220 RID: 8736 RVA: 0x0004F3C4 File Offset: 0x0004D5C4
			[Token(Token = "0x170001E8")]
			public int CountInactive
			{
				[Token(Token = "0x6002220")]
				[Address(RVA = "0x132CB50", Offset = "0x132B950", VA = "0x18132CB50")]
				get
				{
					return this._stack._size;
				}
			}

			// Token: 0x06002221 RID: 8737 RVA: 0x0004F3E4 File Offset: 0x0004D5E4
			[Token(Token = "0x6002221")]
			[Address(RVA = "0x132CA00", Offset = "0x132B800", VA = "0x18132CA00")]
			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: 0x06002222 RID: 8738 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002222")]
			[Address(RVA = "0x132C890", Offset = "0x132B690", VA = "0x18132C890")]
			public XWeaponTrail.Element Get()
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06002223 RID: 8739 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002223")]
			[Address(RVA = "0x132C930", Offset = "0x132B730", VA = "0x18132C930")]
			public void Release(XWeaponTrail.Element element)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

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