using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x02000127 RID: 295
[Token(Token = "0x2000127")]
public class FloorSwitch : PassiveEvent
{
	// Token: 0x06000F76 RID: 3958 RVA: 0x000240E8 File Offset: 0x000222E8
	[Token(Token = "0x6000F76")]
	[Address(RVA = "0x367450", Offset = "0x366450", VA = "0x180367450", 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: 0x06000F77 RID: 3959 RVA: 0x00024160 File Offset: 0x00022360
	[Token(Token = "0x6000F77")]
	[Address(RVA = "0x367A40", Offset = "0x366A40", VA = "0x180367A40", Slot = "6")]
	protected override void Update()
	{
		base.Update();
		this.UpdateChackOn();
	}

	// Token: 0x06000F78 RID: 3960 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000F78")]
	[Address(RVA = "0x367530", Offset = "0x366530", VA = "0x180367530")]
	private void UpdateChackOn()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000F79 RID: 3961 RVA: 0x0002417C File Offset: 0x0002237C
	[Token(Token = "0x6000F79")]
	[Address(RVA = "0x367300", Offset = "0x366300", VA = "0x180367300")]
	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: 0x06000F7A RID: 3962 RVA: 0x0002420C File Offset: 0x0002240C
	[Token(Token = "0x6000F7A")]
	[Address(RVA = "0x367180", Offset = "0x366180", VA = "0x180367180")]
	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: 0x06000F7B RID: 3963 RVA: 0x00024298 File Offset: 0x00022498
	[Token(Token = "0x6000F7B")]
	[Address(RVA = "0x332440", Offset = "0x331440", VA = "0x180332440", Slot = "7")]
	public override void SetTimeScale(float fScaleTime)
	{
		Common.SetEffectTimeScale(this.PS_StartUpSmoke, fScaleTime);
	}

	// Token: 0x06000F7C RID: 3964 RVA: 0x000242B4 File Offset: 0x000224B4
	[Token(Token = "0x6000F7C")]
	[Address(RVA = "0x367A60", Offset = "0x366A60", VA = "0x180367A60")]
	public FloorSwitch()
	{
	}

	// Token: 0x040019D5 RID: 6613
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x40019D5")]
	public Animator Ani;

	// Token: 0x040019D6 RID: 6614
	[Token(Token = "0x40019D6")]
	private const float g_fCheckTime = 0.15f;

	// Token: 0x040019D7 RID: 6615
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x40019D7")]
	private float g_fCheckTimeVal;

	// Token: 0x040019D8 RID: 6616
	[FieldOffset(Offset = "0x2C")]
	[Token(Token = "0x40019D8")]
	private bool g_bStartUpIng;

	// Token: 0x040019D9 RID: 6617
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x40019D9")]
	public float StartUpTime = 1f;

	// Token: 0x040019DA RID: 6618
	[FieldOffset(Offset = "0x34")]
	[Token(Token = "0x40019DA")]
	private float g_fStartUpTimeVal;

	// Token: 0x040019DB RID: 6619
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x40019DB")]
	public ParticleSystem PS_StartUpSmoke;

	// Token: 0x040019DC RID: 6620
	[FieldOffset(Offset = "0x40")]
	[Token(Token = "0x40019DC")]
	public GameObject SE_StartUp;

	// Token: 0x040019DD RID: 6621
	[FieldOffset(Offset = "0x48")]
	[Token(Token = "0x40019DD")]
	public GameObject SE_Dismiss;

	// Token: 0x040019DE RID: 6622
	[FieldOffset(Offset = "0x50")]
	[Token(Token = "0x40019DE")]
	private SoundEffect g_SEStartUp;

	// Token: 0x040019DF RID: 6623
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x40019DF")]
	private SoundEffect g_SEDismiss;

	// Token: 0x040019E0 RID: 6624
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x40019E0")]
	public SceneEvent[] OpenEvent;

	// Token: 0x040019E1 RID: 6625
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x40019E1")]
	public SceneEvent[] ReleaseEvent;
}
