using System;
using Cpp2IlInjected;
using UnityEngine;

namespace Obi
{
	// Token: 0x02000543 RID: 1347
	[Token(Token = "0x2000543")]
	[RequireComponent(typeof(ObiSolver))]
	public class ObiParticleGridDebugger : MonoBehaviour
	{
		// Token: 0x06002EE8 RID: 12008 RVA: 0x00066C70 File Offset: 0x00064E70
		[Token(Token = "0x6002EE8")]
		[Address(RVA = "0xE54A70", Offset = "0xE53A70", VA = "0x180E54A70")]
		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: 0x06002EE9 RID: 12009 RVA: 0x00066CAC File Offset: 0x00064EAC
		[Token(Token = "0x6002EE9")]
		[Address(RVA = "0xE548D0", Offset = "0xE538D0", VA = "0x180E548D0")]
		private void OnDisable()
		{
			ObiSolver obiSolver = this.solver;
			EventHandler eventHandler = new EventHandler(this.Solver_OnFrameEnd);
			obiSolver.OnFrameEnd -= eventHandler;
		}

		// Token: 0x06002EEA RID: 12010 RVA: 0x00066CDC File Offset: 0x00064EDC
		[Token(Token = "0x6002EEA")]
		[Address(RVA = "0xE54B30", Offset = "0xE53B30", VA = "0x180E54B30")]
		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: 0x06002EEB RID: 12011 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002EEB")]
		[Address(RVA = "0xE54960", Offset = "0xE53960", VA = "0x180E54960")]
		private void OnDrawGizmos()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002EEC RID: 12012 RVA: 0x00066D28 File Offset: 0x00064F28
		[Token(Token = "0x6002EEC")]
		[Address(RVA = "0x328C40", Offset = "0x327C40", VA = "0x180328C40")]
		public ObiParticleGridDebugger()
		{
		}

		// Token: 0x04003774 RID: 14196
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003774")]
		private ObiSolver solver;

		// Token: 0x04003775 RID: 14197
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003775")]
		private Oni.GridCell[] cells;
	}
}
