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

// Token: 0x020000FB RID: 251
[Token(Token = "0x20000FB")]
public class EffectUpdater
{
	// Token: 0x1700003D RID: 61
	// (get) Token: 0x06000E19 RID: 3609 RVA: 0x00021C70 File Offset: 0x0001FE70
	[Token(Token = "0x1700003D")]
	public bool IsActive
	{
		[Token(Token = "0x6000E19")]
		[Address(RVA = "0xA61DB0", Offset = "0xA60BB0", VA = "0x180A61DB0")]
		get
		{
			return this.source.activeSelf;
		}
	}

	// Token: 0x1700003E RID: 62
	// (get) Token: 0x06000E1A RID: 3610 RVA: 0x00021C90 File Offset: 0x0001FE90
	[Token(Token = "0x1700003E")]
	public GameObject Source
	{
		[Token(Token = "0x6000E1A")]
		[Address(RVA = "0x2B4010", Offset = "0x2B2E10", VA = "0x1802B4010")]
		get
		{
			return this.source;
		}
	}

	// Token: 0x1700003F RID: 63
	// (get) Token: 0x06000E1B RID: 3611 RVA: 0x00021CA4 File Offset: 0x0001FEA4
	[Token(Token = "0x1700003F")]
	public ParticleSystem Particle
	{
		[Token(Token = "0x6000E1B")]
		[Address(RVA = "0xA61DD0", Offset = "0xA60BD0", VA = "0x180A61DD0")]
		get
		{
			return this.particles[0];
		}
	}

	// Token: 0x17000040 RID: 64
	// (get) Token: 0x06000E1C RID: 3612 RVA: 0x00021CC4 File Offset: 0x0001FEC4
	[Token(Token = "0x17000040")]
	public SoundEffect Sound
	{
		[Token(Token = "0x6000E1C")]
		[Address(RVA = "0x28C210", Offset = "0x28B010", VA = "0x18028C210")]
		get
		{
			return this.sound;
		}
	}

	// Token: 0x06000E1D RID: 3613 RVA: 0x00021CD8 File Offset: 0x0001FED8
	[Token(Token = "0x6000E1D")]
	[Address(RVA = "0xA61C60", Offset = "0xA60A60", VA = "0x180A61C60")]
	public EffectUpdater(GameObject source)
	{
		this.source = source;
		ParticleSystem[] componentsInChildren = source.GetComponentsInChildren<ParticleSystem>(true);
		this.particles = componentsInChildren;
		SoundEffect component = source.GetComponent<SoundEffect>();
		this.sound = component;
		SoundEffect soundEffect = this.sound;
		int num = 0;
		if (soundEffect != num)
		{
			this.sound.InitData("SoundEffect");
		}
		this.particles[0].Stop(true);
	}

	// Token: 0x06000E1E RID: 3614 RVA: 0x00021D58 File Offset: 0x0001FF58
	[Token(Token = "0x6000E1E")]
	[Address(RVA = "0xA615E0", Offset = "0xA603E0", VA = "0x180A615E0")]
	public EffectUpdater Init(float aliveTime, float recycleTime = 3f)
	{
		this.aliveTime = aliveTime;
		this.recycleTime = recycleTime;
		return this;
	}

	// Token: 0x06000E1F RID: 3615 RVA: 0x00021D74 File Offset: 0x0001FF74
	[Token(Token = "0x6000E1F")]
	[Address(RVA = "0x643410", Offset = "0x642210", VA = "0x180643410")]
	public EffectUpdater BindRecycleHandler(Action<EffectUpdater> recycleHandler)
	{
		this.recycleHandler = recycleHandler;
		return this;
	}

	// Token: 0x06000E20 RID: 3616 RVA: 0x00021D8C File Offset: 0x0001FF8C
	[Token(Token = "0x6000E20")]
	[Address(RVA = "0xA61BA0", Offset = "0xA609A0", VA = "0x180A61BA0")]
	public EffectUpdater UpdateTimeScale(float timeScale)
	{
		this.timeScale = timeScale;
		this.UpdateTimeScale();
		return this;
	}

	// Token: 0x06000E21 RID: 3617 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000E21")]
	[Address(RVA = "0xA61BC0", Offset = "0xA609C0", VA = "0x180A61BC0")]
	public EffectUpdater UpdateTransform(Vector3 position, Quaternion rotation)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000E22 RID: 3618 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000E22")]
	[Address(RVA = "0xA615F0", Offset = "0xA603F0", VA = "0x180A615F0")]
	public void PlayEffect(bool withSound = true)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000E23 RID: 3619 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000E23")]
	[Address(RVA = "0xA61810", Offset = "0xA60610", VA = "0x180A61810")]
	public void StopEffect(float duration)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000E24 RID: 3620 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000E24")]
	[Address(RVA = "0xA618F0", Offset = "0xA606F0", VA = "0x180A618F0")]
	public void StopEffect()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000E25 RID: 3621 RVA: 0x00021DA8 File Offset: 0x0001FFA8
	[Token(Token = "0x6000E25")]
	[Address(RVA = "0xA61A40", Offset = "0xA60840", VA = "0x180A61A40")]
	public void UpdateParent(Transform parent)
	{
		this.source.transform.parentInternal = parent;
	}

	// Token: 0x06000E26 RID: 3622 RVA: 0x00021DCC File Offset: 0x0001FFCC
	[Token(Token = "0x6000E26")]
	[Address(RVA = "0xA61A80", Offset = "0xA60880", VA = "0x180A61A80")]
	public void UpdateTimeScale(TimeData stageTimeData)
	{
		float resultTimeScale = stageTimeData.resultTimeScale;
		this.timeScale = resultTimeScale;
		this.UpdateTimeScale();
	}

	// Token: 0x06000E27 RID: 3623 RVA: 0x00021DF4 File Offset: 0x0001FFF4
	[Token(Token = "0x6000E27")]
	[Address(RVA = "0xA61AA0", Offset = "0xA608A0", VA = "0x180A61AA0")]
	private void UpdateTimeScale()
	{
		ParticleSystem[] array = this.particles;
		int num = 0;
		int length = array.Length;
		if (num < length)
		{
			ParticleSystem.MainModule main = array[num].main;
			float num2 = this.timeScale;
			ParticleSystem.MainModule.set_simulationSpeed_Injected(main, num2);
			num++;
		}
		SoundEffect soundEffect = this.sound;
		int num3 = 0;
		if (soundEffect != num3)
		{
			SoundEffect soundEffect2 = this.sound;
			float num4 = this.timeScale;
			soundEffect2.SetTimeScale(num4);
		}
	}

	// Token: 0x06000E28 RID: 3624 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000E28")]
	[Address(RVA = "0xA61400", Offset = "0xA60200", VA = "0x180A61400")]
	public void Dispose()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000E29 RID: 3625 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000E29")]
	[Address(RVA = "0xA617A0", Offset = "0xA605A0", VA = "0x180A617A0")]
	private IEnumerator<float> Play()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000E2A RID: 3626 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000E2A")]
	[Address(RVA = "0xA619D0", Offset = "0xA607D0", VA = "0x180A619D0")]
	private IEnumerator<float> Stop()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x040018B5 RID: 6325
	[FieldOffset(Offset = "0x10")]
	[Token(Token = "0x40018B5")]
	private GameObject source;

	// Token: 0x040018B6 RID: 6326
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x40018B6")]
	private ParticleSystem[] particles;

	// Token: 0x040018B7 RID: 6327
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x40018B7")]
	private SoundEffect sound;

	// Token: 0x040018B8 RID: 6328
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x40018B8")]
	private CoroutineHandle recycleCoroutine;

	// Token: 0x040018B9 RID: 6329
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x40018B9")]
	public Action<EffectUpdater> recycleHandler;

	// Token: 0x040018BA RID: 6330
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x40018BA")]
	private float aliveTime;

	// Token: 0x040018BB RID: 6331
	[FieldOffset(Offset = "0x3C")]
	[Token(Token = "0x40018BB")]
	private float recycleTime;

	// Token: 0x040018BC RID: 6332
	[FieldOffset(Offset = "0x40")]
	[Token(Token = "0x40018BC")]
	private float timeScale = 1f;
}
