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

namespace Obi
{
	// Token: 0x020004D5 RID: 1237
	[Token(Token = "0x20004D5")]
	[ExecuteInEditMode]
	[DisallowMultipleComponent]
	public abstract class ObiEmitterShape : MonoBehaviour
	{
		// Token: 0x17000303 RID: 771
		// (get) Token: 0x06002B80 RID: 11136 RVA: 0x0005DFEC File Offset: 0x0005C1EC
		[Token(Token = "0x17000303")]
		public int DistributionPointsCount
		{
			[Token(Token = "0x6002B80")]
			[Address(RVA = "0x100F7A0", Offset = "0x100E5A0", VA = "0x18100F7A0")]
			get
			{
				return this.distribution._size;
			}
		}

		// Token: 0x06002B81 RID: 11137 RVA: 0x0005E00C File Offset: 0x0005C20C
		[Token(Token = "0x6002B81")]
		[Address(RVA = "0x100F680", Offset = "0x100E480", VA = "0x18100F680")]
		public void OnEnable()
		{
			ObiEmitter component = base.GetComponent<ObiEmitter>();
			int num = 0;
			if (component != num)
			{
				component.EmitterShape = this;
			}
		}

		// Token: 0x06002B82 RID: 11138 RVA: 0x0005E03C File Offset: 0x0005C23C
		[Token(Token = "0x6002B82")]
		[Address(RVA = "0x100F5E0", Offset = "0x100E3E0", VA = "0x18100F5E0")]
		public void OnDisable()
		{
			ObiEmitter component = base.GetComponent<ObiEmitter>();
			int num = 0;
			if (component != num)
			{
				int num2 = 0;
				component.EmitterShape = num2;
				return;
			}
		}

		// Token: 0x06002B83 RID: 11139
		[Token(Token = "0x6002B83")]
		[Address(Slot = "4")]
		public abstract void GenerateDistribution();

		// Token: 0x06002B84 RID: 11140
		[Token(Token = "0x6002B84")]
		[Address(Slot = "5")]
		public abstract bool SupportsAllSamplingMethods();

		// Token: 0x06002B85 RID: 11141 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002B85")]
		[Address(RVA = "0x100F4F0", Offset = "0x100E2F0", VA = "0x18100F4F0")]
		public ObiEmitterShape.DistributionPoint GetDistributionPoint()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002B86 RID: 11142 RVA: 0x0005E06C File Offset: 0x0005C26C
		[Token(Token = "0x6002B86")]
		[Address(RVA = "0x100F720", Offset = "0x100E520", VA = "0x18100F720")]
		protected ObiEmitterShape()
		{
			List<ObiEmitterShape.DistributionPoint> list = new List();
			this.distribution = list;
			base..ctor();
		}

		// Token: 0x040033F8 RID: 13304
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x40033F8")]
		public ObiEmitterShape.SamplingMethod samplingMethod;

		// Token: 0x040033F9 RID: 13305
		[FieldOffset(Offset = "0x1C")]
		[Token(Token = "0x40033F9")]
		[HideInInspector]
		public float particleSize;

		// Token: 0x040033FA RID: 13306
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x40033FA")]
		protected List<ObiEmitterShape.DistributionPoint> distribution;

		// Token: 0x040033FB RID: 13307
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x40033FB")]
		protected int lastDistributionPoint;

		// Token: 0x020004D6 RID: 1238
		[Token(Token = "0x20004D6")]
		public enum SamplingMethod
		{
			// Token: 0x040033FD RID: 13309
			[Token(Token = "0x40033FD")]
			SURFACE,
			// Token: 0x040033FE RID: 13310
			[Token(Token = "0x40033FE")]
			LAYER,
			// Token: 0x040033FF RID: 13311
			[Token(Token = "0x40033FF")]
			FILL
		}

		// Token: 0x020004D7 RID: 1239
		[Token(Token = "0x20004D7")]
		public struct DistributionPoint
		{
			// Token: 0x06002B87 RID: 11143 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002B87")]
			[Address(RVA = "0x69CAC0", Offset = "0x69B8C0", VA = "0x18069CAC0")]
			public DistributionPoint(Vector3 position, Vector3 velocity)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06002B88 RID: 11144 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002B88")]
			[Address(RVA = "0x69CA90", Offset = "0x69B890", VA = "0x18069CA90")]
			public DistributionPoint(Vector3 position, Vector3 velocity, Color color)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x04003400 RID: 13312
			[FieldOffset(Offset = "0x0")]
			[Token(Token = "0x4003400")]
			public Vector3 position;

			// Token: 0x04003401 RID: 13313
			[FieldOffset(Offset = "0xC")]
			[Token(Token = "0x4003401")]
			public Vector3 velocity;

			// Token: 0x04003402 RID: 13314
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x4003402")]
			public Color color;
		}
	}
}
