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

namespace Obi
{
	// Token: 0x020004EC RID: 1260
	[Token(Token = "0x20004EC")]
	[ExecuteInEditMode]
	public class ObiParticleHandle : MonoBehaviour
	{
		// Token: 0x17000312 RID: 786
		// (get) Token: 0x06002C24 RID: 11300 RVA: 0x0005FAA8 File Offset: 0x0005DCA8
		[Token(Token = "0x17000312")]
		public int ParticleCount
		{
			[Token(Token = "0x6002C24")]
			[Address(RVA = "0xD24940", Offset = "0xD23740", VA = "0x180D24940")]
			get
			{
				return this.handledParticleIndices._size;
			}
		}

		// Token: 0x17000313 RID: 787
		// (get) Token: 0x06002C26 RID: 11302 RVA: 0x0005FB9C File Offset: 0x0005DD9C
		// (set) Token: 0x06002C25 RID: 11301 RVA: 0x0005FAC8 File Offset: 0x0005DCC8
		[Token(Token = "0x17000313")]
		public ObiActor Actor
		{
			[Token(Token = "0x6002C26")]
			[Address(RVA = "0x2B4380", Offset = "0x2B3180", VA = "0x1802B4380")]
			get
			{
				return this.actor;
			}
			[Token(Token = "0x6002C25")]
			[Address(RVA = "0xD24980", Offset = "0xD23780", VA = "0x180D24980")]
			set
			{
				if (this.actor != value)
				{
					ObiActor obiActor = this.actor;
					int num = 0;
					if (obiActor != num)
					{
						ObiSolver solver = this.actor.solver;
						int num2 = 0;
						if (solver != num2)
						{
							ObiSolver solver2 = this.actor.solver;
							EventHandler eventHandler = new EventHandler(this.Actor_solver_OnFrameBegin);
							solver2.OnFrameBegin -= eventHandler;
						}
					}
					this.actor = value;
					ObiActor obiActor2 = this.actor;
					int num3 = 0;
					if (obiActor2 != num3)
					{
						ObiSolver solver3 = this.actor.solver;
						int num4 = 0;
						if (solver3 != num4)
						{
							ObiSolver solver4 = this.actor.solver;
							EventHandler eventHandler2 = new EventHandler(this.Actor_solver_OnFrameBegin);
							solver4.OnFrameBegin += eventHandler2;
						}
					}
				}
			}
		}

		// Token: 0x06002C27 RID: 11303 RVA: 0x0005FBB0 File Offset: 0x0005DDB0
		[Token(Token = "0x6002C27")]
		[Address(RVA = "0xD242A0", Offset = "0xD230A0", VA = "0x180D242A0")]
		private void OnEnable()
		{
			ObiActor obiActor = this.actor;
			int num = 0;
			if (obiActor != num)
			{
				ObiSolver solver = this.actor.solver;
				int num2 = 0;
				if (solver != num2)
				{
					ObiSolver solver2 = this.actor.solver;
					EventHandler eventHandler = new EventHandler(this.Actor_solver_OnFrameBegin);
					solver2.OnFrameBegin += eventHandler;
				}
			}
		}

		// Token: 0x06002C28 RID: 11304 RVA: 0x0005FC14 File Offset: 0x0005DE14
		[Token(Token = "0x6002C28")]
		[Address(RVA = "0xD24170", Offset = "0xD22F70", VA = "0x180D24170")]
		private void OnDisable()
		{
			ObiActor obiActor = this.actor;
			int num = 0;
			if (obiActor != num)
			{
				ObiSolver solver = this.actor.solver;
				int num2 = 0;
				if (solver != num2)
				{
					ObiSolver solver2 = this.actor.solver;
					EventHandler eventHandler = new EventHandler(this.Actor_solver_OnFrameBegin);
					solver2.OnFrameBegin -= eventHandler;
					this.ResetInvMasses();
				}
			}
		}

		// Token: 0x06002C29 RID: 11305 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C29")]
		[Address(RVA = "0xD24600", Offset = "0xD23400", VA = "0x180D24600")]
		private void ResetInvMasses()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C2A RID: 11306 RVA: 0x0005FC7C File Offset: 0x0005DE7C
		[Token(Token = "0x6002C2A")]
		[Address(RVA = "0xD240D0", Offset = "0xD22ED0", VA = "0x180D240D0")]
		public void Clear()
		{
			this.ResetInvMasses();
			this.handledParticleIndices.Clear();
			this.handledParticlePositions.Clear();
			this.handledParticleInvMasses.Clear();
		}

		// Token: 0x06002C2B RID: 11307 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C2B")]
		[Address(RVA = "0xD23FC0", Offset = "0xD22DC0", VA = "0x180D23FC0")]
		public void AddParticle(int index, Vector3 position, float invMass)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C2C RID: 11308 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C2C")]
		[Address(RVA = "0xD243C0", Offset = "0xD231C0", VA = "0x180D243C0")]
		public void RemoveParticle(int index)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C2D RID: 11309 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C2D")]
		[Address(RVA = "0xD23A50", Offset = "0xD22850", VA = "0x180D23A50")]
		private void Actor_solver_OnFrameBegin(object sender, EventArgs e)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C2E RID: 11310 RVA: 0x0005FCB8 File Offset: 0x0005DEB8
		[Token(Token = "0x6002C2E")]
		[Address(RVA = "0xD24840", Offset = "0xD23640", VA = "0x180D24840")]
		public ObiParticleHandle()
		{
			List<int> list = new List();
			this.handledParticleIndices = list;
			List<Vector3> list2 = new List();
			this.handledParticlePositions = list2;
			List<float> list3 = new List();
			this.handledParticleInvMasses = list3;
			base..ctor();
		}

		// Token: 0x0400348C RID: 13452
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x400348C")]
		[SerializeField]
		[HideInInspector]
		private ObiActor actor;

		// Token: 0x0400348D RID: 13453
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x400348D")]
		[HideInInspector]
		[SerializeField]
		private List<int> handledParticleIndices;

		// Token: 0x0400348E RID: 13454
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x400348E")]
		[HideInInspector]
		[SerializeField]
		private List<Vector3> handledParticlePositions;

		// Token: 0x0400348F RID: 13455
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x400348F")]
		[HideInInspector]
		[SerializeField]
		private List<float> handledParticleInvMasses;

		// Token: 0x04003490 RID: 13456
		[Token(Token = "0x4003490")]
		private const float HANDLED_PARTICLE_MASS = 0.0001f;
	}
}
