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

namespace Obi
{
	// Token: 0x0200052D RID: 1325
	[Token(Token = "0x200052D")]
	[ExecuteInEditMode]
	[DisallowMultipleComponent]
	public abstract class ObiEmitterShape : MonoBehaviour
	{
		// Token: 0x17000328 RID: 808
		// (get) Token: 0x06002E49 RID: 11849 RVA: 0x00065284 File Offset: 0x00063484
		[Token(Token = "0x17000328")]
		public int DistributionPointsCount
		{
			[Token(Token = "0x6002E49")]
			[Address(RVA = "0x10A2AD0", Offset = "0x10A1AD0", VA = "0x1810A2AD0")]
			get
			{
				return this.distribution._size;
			}
		}

		// Token: 0x06002E4A RID: 11850 RVA: 0x000652A4 File Offset: 0x000634A4
		[Token(Token = "0x6002E4A")]
		[Address(RVA = "0x10A29B0", Offset = "0x10A19B0", VA = "0x1810A29B0")]
		public void OnEnable()
		{
			ObiEmitter component = base.GetComponent<ObiEmitter>();
			int num = 0;
			if (component != num)
			{
				component.EmitterShape = this;
			}
		}

		// Token: 0x06002E4B RID: 11851 RVA: 0x000652D4 File Offset: 0x000634D4
		[Token(Token = "0x6002E4B")]
		[Address(RVA = "0x10A2910", Offset = "0x10A1910", VA = "0x1810A2910")]
		public void OnDisable()
		{
			ObiEmitter component = base.GetComponent<ObiEmitter>();
			int num = 0;
			if (component != num)
			{
				int num2 = 0;
				component.EmitterShape = num2;
				return;
			}
		}

		// Token: 0x06002E4C RID: 11852
		[Token(Token = "0x6002E4C")]
		[Address(Slot = "4")]
		public abstract void GenerateDistribution();

		// Token: 0x06002E4D RID: 11853
		[Token(Token = "0x6002E4D")]
		[Address(Slot = "5")]
		public abstract bool SupportsAllSamplingMethods();

		// Token: 0x06002E4E RID: 11854 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002E4E")]
		[Address(RVA = "0x10A2820", Offset = "0x10A1820", VA = "0x1810A2820")]
		public ObiEmitterShape.DistributionPoint GetDistributionPoint()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002E4F RID: 11855 RVA: 0x00065304 File Offset: 0x00063504
		[Token(Token = "0x6002E4F")]
		[Address(RVA = "0x10A2A50", Offset = "0x10A1A50", VA = "0x1810A2A50")]
		protected ObiEmitterShape()
		{
			List<ObiEmitterShape.DistributionPoint> list = new List();
			this.distribution = list;
			base..ctor();
		}

		// Token: 0x040036E2 RID: 14050
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x40036E2")]
		public ObiEmitterShape.SamplingMethod samplingMethod;

		// Token: 0x040036E3 RID: 14051
		[FieldOffset(Offset = "0x1C")]
		[Token(Token = "0x40036E3")]
		[HideInInspector]
		public float particleSize;

		// Token: 0x040036E4 RID: 14052
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x40036E4")]
		protected List<ObiEmitterShape.DistributionPoint> distribution;

		// Token: 0x040036E5 RID: 14053
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x40036E5")]
		protected int lastDistributionPoint;

		// Token: 0x0200052E RID: 1326
		[Token(Token = "0x200052E")]
		public enum SamplingMethod
		{
			// Token: 0x040036E7 RID: 14055
			[Token(Token = "0x40036E7")]
			SURFACE,
			// Token: 0x040036E8 RID: 14056
			[Token(Token = "0x40036E8")]
			LAYER,
			// Token: 0x040036E9 RID: 14057
			[Token(Token = "0x40036E9")]
			FILL
		}

		// Token: 0x0200052F RID: 1327
		[Token(Token = "0x200052F")]
		public struct DistributionPoint
		{
			// Token: 0x06002E50 RID: 11856 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002E50")]
			[Address(RVA = "0x698800", Offset = "0x697800", VA = "0x180698800")]
			public DistributionPoint(Vector3 position, Vector3 velocity)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06002E51 RID: 11857 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002E51")]
			[Address(RVA = "0x6987D0", Offset = "0x6977D0", VA = "0x1806987D0")]
			public DistributionPoint(Vector3 position, Vector3 velocity, Color color)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x040036EA RID: 14058
			[FieldOffset(Offset = "0x0")]
			[Token(Token = "0x40036EA")]
			public Vector3 position;

			// Token: 0x040036EB RID: 14059
			[FieldOffset(Offset = "0xC")]
			[Token(Token = "0x40036EB")]
			public Vector3 velocity;

			// Token: 0x040036EC RID: 14060
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x40036EC")]
			public Color color;
		}
	}
}
