using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x02000101 RID: 257
[Token(Token = "0x2000101")]
public class FloorSwitch : PassiveEvent
{
	// Token: 0x06000E4B RID: 3659 RVA: 0x00022314 File Offset: 0x00020514
	[Token(Token = "0x6000E4B")]
	[Address(RVA = "0x4C4C50", Offset = "0x4C3A50", VA = "0x1804C4C50", Slot = "4")]
	protected override void Start()
	{
		base..ctor();
		float startUpTime = this.StartUpTime;
		GameObject se_StartUp = this.SE_StartUp;
		this.g_fStartUpTimeVal = startUpTime;
		Transform transform = base.transform;
		SoundEffect soundEffectOfPrefabs = Common.GetSoundEffectOfPrefabs(se_StartUp, transform);
		this.g_SEStartUp = soundEffectOfPrefabs;
		Game.BindStageTimeScale(this.g_SEStartUp);
		GameObject se_Dismiss = this.SE_Dismiss;
		Transform transform2 = base.transform;
		SoundEffect soundEffectOfPrefabs2 = Common.GetSoundEffectOfPrefabs(se_Dismiss, transform2);
		this.g_SEDismiss = soundEffectOfPrefabs2;
		Game.BindStageTimeScale(this.g_SEDismiss);
	}

	// Token: 0x06000E4C RID: 3660 RVA: 0x0002238C File Offset: 0x0002058C
	[Token(Token = "0x6000E4C")]
	[Address(RVA = "0x4C5240", Offset = "0x4C4040", VA = "0x1804C5240", Slot = "6")]
	protected override void Update()
	{
		base.Update();
		this.UpdateChackOn();
	}

	// Token: 0x06000E4D RID: 3661 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000E4D")]
	[Address(RVA = "0x4C4D30", Offset = "0x4C3B30", VA = "0x1804C4D30")]
	private void UpdateChackOn()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000E4E RID: 3662 RVA: 0x000223A8 File Offset: 0x000205A8
	[Token(Token = "0x6000E4E")]
	[Address(RVA = "0x4C4B00", Offset = "0x4C3900", VA = "0x1804C4B00")]
	public void StartUp()
	{
		ParticleSystem ps_StartUpSmoke = this.PS_StartUpSmoke;
		int num = 0;
		this.g_bStartUpIng = true;
		this.g_fStartUpTimeVal = (float)num;
		ps_StartUpSmoke.Play(true);
		this.g_SEStartUp.PlayRandom(1f, 1f);
		SceneEvent[] openEvent = this.OpenEvent;
		if (openEvent != 0 && num < openEvent.Length)
		{
			SceneEvent sceneEvent = openEvent[num];
			int num2 = 0;
			if (sceneEvent != num2)
			{
				this.OpenEvent[num].OpenEvent();
			}
			SceneEvent[] openEvent2 = this.OpenEvent;
			num++;
		}
	}

	// Token: 0x06000E4F RID: 3663 RVA: 0x00022438 File Offset: 0x00020638
	[Token(Token = "0x6000E4F")]
	[Address(RVA = "0x4C4980", Offset = "0x4C3780", VA = "0x1804C4980")]
	public void ResetEvent()
	{
		SoundEffect soundEffect = this.g_SEDismiss;
		this.g_bStartUpIng = false;
		soundEffect.PlayRandom(1f, 1f);
		SceneEvent[] releaseEvent = this.ReleaseEvent;
		if (releaseEvent != 0)
		{
			int num = 0;
			if (num < releaseEvent.Length)
			{
				SceneEvent sceneEvent = releaseEvent[num];
				int num2 = 0;
				if (sceneEvent != num2)
				{
					this.ReleaseEvent[num].ReleaseEvent();
					this.ReleaseEvent[num].ResetEvent();
				}
				SceneEvent[] releaseEvent2 = this.ReleaseEvent;
				num++;
			}
		}
	}

	// Token: 0x06000E50 RID: 3664 RVA: 0x000224C4 File Offset: 0x000206C4
	[Token(Token = "0x6000E50")]
	[Address(RVA = "0x311AC0", Offset = "0x3108C0", VA = "0x180311AC0", Slot = "7")]
	public override void SetTimeScale(float fScaleTime)
	{
		Common.SetEffectTimeScale(this.PS_StartUpSmoke, fScaleTime);
	}

	// Token: 0x06000E51 RID: 3665 RVA: 0x000224E0 File Offset: 0x000206E0
	[Token(Token = "0x6000E51")]
	[Address(RVA = "0x4C5260", Offset = "0x4C4060", VA = "0x1804C5260")]
	public FloorSwitch()
	{
	}

	// Token: 0x040018CD RID: 6349
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x40018CD")]
	public Animator Ani;

	// Token: 0x040018CE RID: 6350
	[Token(Token = "0x40018CE")]
	private const float g_fCheckTime = 0.15f;

	// Token: 0x040018CF RID: 6351
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x40018CF")]
	private float g_fCheckTimeVal;

	// Token: 0x040018D0 RID: 6352
	[FieldOffset(Offset = "0x2C")]
	[Token(Token = "0x40018D0")]
	private bool g_bStartUpIng;

	// Token: 0x040018D1 RID: 6353
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x40018D1")]
	public float StartUpTime = 1f;

	// Token: 0x040018D2 RID: 6354
	[FieldOffset(Offset = "0x34")]
	[Token(Token = "0x40018D2")]
	private float g_fStartUpTimeVal;

	// Token: 0x040018D3 RID: 6355
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x40018D3")]
	public ParticleSystem PS_StartUpSmoke;

	// Token: 0x040018D4 RID: 6356
	[FieldOffset(Offset = "0x40")]
	[Token(Token = "0x40018D4")]
	public GameObject SE_StartUp;

	// Token: 0x040018D5 RID: 6357
	[FieldOffset(Offset = "0x48")]
	[Token(Token = "0x40018D5")]
	public GameObject SE_Dismiss;

	// Token: 0x040018D6 RID: 6358
	[FieldOffset(Offset = "0x50")]
	[Token(Token = "0x40018D6")]
	private SoundEffect g_SEStartUp;

	// Token: 0x040018D7 RID: 6359
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x40018D7")]
	private SoundEffect g_SEDismiss;

	// Token: 0x040018D8 RID: 6360
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x40018D8")]
	public SceneEvent[] OpenEvent;

	// Token: 0x040018D9 RID: 6361
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x40018D9")]
	public SceneEvent[] ReleaseEvent;
}
