using System;
using Cpp2IlInjected;
using UnityEngine;

namespace Obi
{
	// Token: 0x020004EB RID: 1259
	[Token(Token = "0x20004EB")]
	[RequireComponent(typeof(ObiSolver))]
	public class ObiParticleGridDebugger : MonoBehaviour
	{
		// Token: 0x06002C1F RID: 11295 RVA: 0x0005F9DC File Offset: 0x0005DBDC
		[Token(Token = "0x6002C1F")]
		[Address(RVA = "0xD23900", Offset = "0xD22700", VA = "0x180D23900")]
		private void OnEnable()
		{
			ObiSolver component = base.GetComponent<ObiSolver>();
			this.solver = component;
			ObiSolver obiSolver = this.solver;
			EventHandler eventHandler = new EventHandler(this.Solver_OnFrameEnd);
			obiSolver.OnFrameEnd += eventHandler;
		}

		// Token: 0x06002C20 RID: 11296 RVA: 0x0005FA18 File Offset: 0x0005DC18
		[Token(Token = "0x6002C20")]
		[Address(RVA = "0xD23760", Offset = "0xD22560", VA = "0x180D23760")]
		private void OnDisable()
		{
			ObiSolver obiSolver = this.solver;
			EventHandler eventHandler = new EventHandler(this.Solver_OnFrameEnd);
			obiSolver.OnFrameEnd -= eventHandler;
		}

		// Token: 0x06002C21 RID: 11297 RVA: 0x0005FA48 File Offset: 0x0005DC48
		[Token(Token = "0x6002C21")]
		[Address(RVA = "0xD239C0", Offset = "0xD227C0", VA = "0x180D239C0")]
		private void Solver_OnFrameEnd(object sender, EventArgs e)
		{
			Oni.GridCell[] array = new Oni.GridCell[Oni.GetParticleGridSize(this.solver.oniSolver)];
			this.cells = array;
			ObiSolver obiSolver = this.solver;
			Oni.GridCell[] array2 = this.cells;
			Oni.GetParticleGrid(obiSolver.oniSolver, array2);
		}

		// Token: 0x06002C22 RID: 11298 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002C22")]
		[Address(RVA = "0xD237F0", Offset = "0xD225F0", VA = "0x180D237F0")]
		private void OnDrawGizmos()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002C23 RID: 11299 RVA: 0x0005FA94 File Offset: 0x0005DC94
		[Token(Token = "0x6002C23")]
		[Address(RVA = "0x3088F0", Offset = "0x3076F0", VA = "0x1803088F0")]
		public ObiParticleGridDebugger()
		{
		}

		// Token: 0x0400348A RID: 13450
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x400348A")]
		private ObiSolver solver;

		// Token: 0x0400348B RID: 13451
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x400348B")]
		private Oni.GridCell[] cells;
	}
}
