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

namespace Obi
{
	// Token: 0x02000544 RID: 1348
	[Token(Token = "0x2000544")]
	[ExecuteInEditMode]
	public class ObiParticleHandle : MonoBehaviour
	{
		// Token: 0x17000337 RID: 823
		// (get) Token: 0x06002EED RID: 12013 RVA: 0x00066D3C File Offset: 0x00064F3C
		[Token(Token = "0x17000337")]
		public int ParticleCount
		{
			[Token(Token = "0x6002EED")]
			[Address(RVA = "0xE55AB0", Offset = "0xE54AB0", VA = "0x180E55AB0")]
			get
			{
				return this.handledParticleIndices._size;
			}
		}

		// Token: 0x17000338 RID: 824
		// (get) Token: 0x06002EEF RID: 12015 RVA: 0x00066E30 File Offset: 0x00065030
		// (set) Token: 0x06002EEE RID: 12014 RVA: 0x00066D5C File Offset: 0x00064F5C
		[Token(Token = "0x17000338")]
		public ObiActor Actor
		{
			[Token(Token = "0x6002EEF")]
			[Address(RVA = "0x2EF530", Offset = "0x2EE530", VA = "0x1802EF530")]
			get
			{
				return this.actor;
			}
			[Token(Token = "0x6002EEE")]
			[Address(RVA = "0xE55AF0", Offset = "0xE54AF0", VA = "0x180E55AF0")]
			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: 0x06002EF0 RID: 12016 RVA: 0x00066E44 File Offset: 0x00065044
		[Token(Token = "0x6002EF0")]
		[Address(RVA = "0xE55410", Offset = "0xE54410", VA = "0x180E55410")]
		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: 0x06002EF1 RID: 12017 RVA: 0x00066EA8 File Offset: 0x000650A8
		[Token(Token = "0x6002EF1")]
		[Address(RVA = "0xE552E0", Offset = "0xE542E0", VA = "0x180E552E0")]
		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: 0x06002EF2 RID: 12018 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EF2")]
		[Address(RVA = "0xE55770", Offset = "0xE54770", VA = "0x180E55770")]
		private void ResetInvMasses()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EF3 RID: 12019 RVA: 0x00066F10 File Offset: 0x00065110
		[Token(Token = "0x6002EF3")]
		[Address(RVA = "0xE55240", Offset = "0xE54240", VA = "0x180E55240")]
		public void Clear()
		{
			this.ResetInvMasses();
			this.handledParticleIndices.Clear();
			this.handledParticlePositions.Clear();
			this.handledParticleInvMasses.Clear();
		}

		// Token: 0x06002EF4 RID: 12020 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EF4")]
		[Address(RVA = "0xE55130", Offset = "0xE54130", VA = "0x180E55130")]
		public void AddParticle(int index, Vector3 position, float invMass)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EF5 RID: 12021 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EF5")]
		[Address(RVA = "0xE55530", Offset = "0xE54530", VA = "0x180E55530")]
		public void RemoveParticle(int index)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EF6 RID: 12022 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EF6")]
		[Address(RVA = "0xE54BC0", Offset = "0xE53BC0", VA = "0x180E54BC0")]
		private void Actor_solver_OnFrameBegin(object sender, EventArgs e)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EF7 RID: 12023 RVA: 0x00066F4C File Offset: 0x0006514C
		[Token(Token = "0x6002EF7")]
		[Address(RVA = "0xE559B0", Offset = "0xE549B0", VA = "0x180E559B0")]
		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: 0x04003776 RID: 14198
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003776")]
		[SerializeField]
		[HideInInspector]
		private ObiActor actor;

		// Token: 0x04003777 RID: 14199
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003777")]
		[SerializeField]
		[HideInInspector]
		private List<int> handledParticleIndices;

		// Token: 0x04003778 RID: 14200
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4003778")]
		[SerializeField]
		[HideInInspector]
		private List<Vector3> handledParticlePositions;

		// Token: 0x04003779 RID: 14201
		[FieldOffset(Offset = "0x30")]
		[Token(Token = "0x4003779")]
		[SerializeField]
		[HideInInspector]
		private List<float> handledParticleInvMasses;

		// Token: 0x0400377A RID: 14202
		[Token(Token = "0x400377A")]
		private const float HANDLED_PARTICLE_MASS = 0.0001f;
	}
}
