using System;
using Cpp2IlInjected;
using UnityEngine;

namespace Obi
{
	// Token: 0x02000528 RID: 1320
	[Token(Token = "0x2000528")]
	public abstract class ObiEmitterMaterial : ScriptableObject
	{
		// Token: 0x14000012 RID: 18
		// (add) Token: 0x06002E3B RID: 11835 RVA: 0x00065044 File Offset: 0x00063244
		// (remove) Token: 0x06002E3C RID: 11836 RVA: 0x00065098 File Offset: 0x00063298
		[Token(Token = "0x14000012")]
		public event EventHandler<ObiEmitterMaterial.MaterialChangeEventArgs> OnChangesMade
		{
			[Token(Token = "0x6002E3B")]
			[Address(RVA = "0x10A26D0", Offset = "0x10A16D0", VA = "0x1810A26D0")]
			add
			{
				Delegate @delegate = Delegate.Remove(this.onChangesMade, value);
				int num = 0;
				if (@delegate == 0 || @delegate != 0)
				{
					this.onChangesMade = num;
					Delegate delegate2 = Delegate.Combine(this.onChangesMade, value);
					if (delegate2 != 0 && delegate2 == 0)
					{
						throw new InvalidCastException();
					}
					this.onChangesMade = delegate2;
				}
				throw new InvalidCastException();
			}
			[Token(Token = "0x6002E3C")]
			[Address(RVA = "0x10A27A0", Offset = "0x10A17A0", VA = "0x1810A27A0")]
			remove
			{
				Delegate @delegate = Delegate.Remove(this.onChangesMade, value);
				int num = 0;
				if (@delegate == 0 || @delegate != 0)
				{
					this.onChangesMade = num;
				}
				throw new InvalidCastException();
			}
		}

		// Token: 0x06002E3D RID: 11837 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002E3D")]
		[Address(RVA = "0x10A2560", Offset = "0x10A1560", VA = "0x1810A2560")]
		public void CommitChanges(ObiEmitterMaterial.MaterialChanges changes)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002E3E RID: 11838 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002E3E")]
		[Address(RVA = "0x10A2670", Offset = "0x10A1670", VA = "0x1810A2670")]
		public float GetParticleSize(Oni.SolverParameters.Mode mode)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002E3F RID: 11839 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002E3F")]
		[Address(RVA = "0x10A25F0", Offset = "0x10A15F0", VA = "0x1810A25F0")]
		public float GetParticleMass(Oni.SolverParameters.Mode mode)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002E40 RID: 11840
		[Token(Token = "0x6002E40")]
		[Address(Slot = "4")]
		public abstract Oni.FluidMaterial GetEquivalentOniMaterial(Oni.SolverParameters.Mode mode);

		// Token: 0x06002E41 RID: 11841 RVA: 0x000650C8 File Offset: 0x000632C8
		[Token(Token = "0x6002E41")]
		[Address(RVA = "0x10A2540", Offset = "0x10A1540", VA = "0x1810A2540")]
		protected ObiEmitterMaterial()
		{
		}

		// Token: 0x040036D3 RID: 14035
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x40036D3")]
		public float resolution = 1f;

		// Token: 0x040036D4 RID: 14036
		[FieldOffset(Offset = "0x1C")]
		[Token(Token = "0x40036D4")]
		public float restDensity = 1000f;

		// Token: 0x040036D5 RID: 14037
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x40036D5")]
		private EventHandler<ObiEmitterMaterial.MaterialChangeEventArgs> onChangesMade;

		// Token: 0x02000529 RID: 1321
		[Token(Token = "0x2000529")]
		public class MaterialChangeEventArgs : EventArgs
		{
			// Token: 0x06002E42 RID: 11842 RVA: 0x000650F4 File Offset: 0x000632F4
			[Token(Token = "0x6002E42")]
			[Address(RVA = "0x699E40", Offset = "0x698E40", VA = "0x180699E40")]
			public MaterialChangeEventArgs(ObiEmitterMaterial.MaterialChanges changes)
			{
				this.changes = changes;
			}

			// Token: 0x040036D6 RID: 14038
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x40036D6")]
			public ObiEmitterMaterial.MaterialChanges changes;
		}

		// Token: 0x0200052A RID: 1322
		[Token(Token = "0x200052A")]
		[Flags]
		public enum MaterialChanges
		{
			// Token: 0x040036D8 RID: 14040
			[Token(Token = "0x40036D8")]
			PER_MATERIAL_DATA = 0,
			// Token: 0x040036D9 RID: 14041
			[Token(Token = "0x40036D9")]
			PER_PARTICLE_DATA = 1
		}
	}
}
