using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x02000191 RID: 401
[Token(Token = "0x2000191")]
public class BossRushTeleport : PassiveEvent
{
	// Token: 0x06001358 RID: 4952 RVA: 0x0002B9C8 File Offset: 0x00029BC8
	[Token(Token = "0x6001358")]
	[Address(RVA = "0x114D8C0", Offset = "0x114C8C0", VA = "0x18114D8C0", Slot = "4")]
	protected override void Start()
	{
		base..ctor();
		Light lg = this.LG;
		this.g_fLightIntensityVal = 1.5f;
		lg.enabled = true;
		Light lgtarget = this.LGTarget;
		int num = 0;
		lgtarget.enabled = num != 0;
		this.PS_MagicCircle.Play(true);
		this.PS_StartUp.Stop(true);
		this.PS_Teleport.Stop(true);
		this.PS_Target.Stop(true);
		GameObject se_Loop = this.SE_Loop;
		Transform transform = base.transform;
		SoundEffect soundEffectOfPrefabs = Common.GetSoundEffectOfPrefabs(se_Loop, transform);
		this.g_SELoop = soundEffectOfPrefabs;
		Game.BindStageTimeScale(this.g_SELoop);
		GameObject se_Open = this.SE_Open;
		Transform transform2 = base.transform;
		SoundEffect soundEffectOfPrefabs2 = Common.GetSoundEffectOfPrefabs(se_Open, transform2);
		this.g_SE_Open = soundEffectOfPrefabs2;
		Game.BindStageTimeScale(this.g_SE_Open);
		GameObject se_Start = this.SE_Start;
		Transform transform3 = base.transform;
		SoundEffect soundEffectOfPrefabs3 = Common.GetSoundEffectOfPrefabs(se_Start, transform3);
		this.g_SEStart = soundEffectOfPrefabs3;
		Game.BindStageTimeScale(this.g_SEStart);
		GameObject se_Teleport = this.SE_Teleport;
		Transform transform4 = base.transform;
		SoundEffect soundEffectOfPrefabs4 = Common.GetSoundEffectOfPrefabs(se_Teleport, transform4);
		this.g_SETeleport = soundEffectOfPrefabs4;
		Game.BindStageTimeScale(this.g_SETeleport);
		GameObject se_Target = this.SE_Target;
		Transform transform5 = base.transform;
		SoundEffect soundEffectOfPrefabs5 = Common.GetSoundEffectOfPrefabs(se_Target, transform5);
		this.g_SETarget = soundEffectOfPrefabs5;
		Game.BindStageTimeScale(this.g_SETarget);
	}

	// Token: 0x06001359 RID: 4953 RVA: 0x0002BB20 File Offset: 0x00029D20
	[Token(Token = "0x6001359")]
	[Address(RVA = "0x114D530", Offset = "0x114C530", VA = "0x18114D530")]
	public void Open()
	{
		this.PS_MagicCircle.Stop(true);
		this.PS_StartUp.Play(true);
		this.g_SE_Open.PlayRandom(1f, 1f);
	}

	// Token: 0x0600135A RID: 4954 RVA: 0x0002BB60 File Offset: 0x00029D60
	[Token(Token = "0x600135A")]
	[Address(RVA = "0x114D4F0", Offset = "0x114C4F0", VA = "0x18114D4F0")]
	public void Close()
	{
		this.PS_MagicCircle.Play(true);
		this.PS_StartUp.Stop(true);
	}

	// Token: 0x0600135B RID: 4955 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600135B")]
	[Address(RVA = "0x114DB00", Offset = "0x114CB00", VA = "0x18114DB00", Slot = "6")]
	protected override void Update()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600135C RID: 4956 RVA: 0x0002BB8C File Offset: 0x00029D8C
	[Token(Token = "0x600135C")]
	[Address(RVA = "0x114D5F0", Offset = "0x114C5F0", VA = "0x18114D5F0")]
	public void StartUp(UIBattleSelectHandler bsHandler, UIBattleSelect ui)
	{
		int index = bsHandler.index;
		Transform[] teleportLocation = this.TeleportLocation;
		if (index < teleportLocation.Length)
		{
			this.uiBattleSelect = ui;
			Transform transform = this.TeleportLocation[index];
			this.Target = transform;
			this.PS_Teleport.Play(true);
			SoundEffect soundEffect = this.g_SEStart;
			int num = 0;
			this.g_bStartUp = true;
			this.g_fLightIntensityAdd = (float)num;
			this.g_fStartUpTimeVal = (float)num;
			this.g_bSEStart = true;
			soundEffect.PlayRandom(1f, 1f);
			BR_ResetBossScene[] resetBossScene = this.ResetBossScene;
			if (num < resetBossScene.Length)
			{
				resetBossScene[num].OpenEvent();
				BR_ResetBossScene[] resetBossScene2 = this.ResetBossScene;
				num++;
			}
			Game.sceneManager.BGM.StopBGM();
			Game.GetPlayerManager().SetScriptCancelCharge();
			if (bsHandler.bossRushFlag == SaveSystem.ScriptType.BRBoss06 && Game.GameSave.flags.stageBRBoss06 && !Game.GameSave.flags.stageBRClear)
			{
				this.g_bTeleportEnding = true;
			}
		}
	}

	// Token: 0x0600135D RID: 4957 RVA: 0x0002BCA0 File Offset: 0x00029EA0
	[Token(Token = "0x600135D")]
	[Address(RVA = "0x114D590", Offset = "0x114C590", VA = "0x18114D590", Slot = "7")]
	public override void SetTimeScale(float fScaleTime)
	{
		Common.SetEffectTimeScale(this.PS_MagicCircle, fScaleTime);
		Common.SetEffectTimeScale(this.PS_StartUp, fScaleTime);
		Common.SetEffectTimeScale(this.PS_Teleport, fScaleTime);
		Common.SetEffectTimeScale(this.PS_Target, fScaleTime);
	}

	// Token: 0x0600135E RID: 4958 RVA: 0x0002BCE0 File Offset: 0x00029EE0
	[Token(Token = "0x600135E")]
	[Address(RVA = "0x114E510", Offset = "0x114D510", VA = "0x18114E510")]
	public BossRushTeleport()
	{
	}

	// Token: 0x04001D1C RID: 7452
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4001D1C")]
	public Transform[] TeleportLocation;

	// Token: 0x04001D1D RID: 7453
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x4001D1D")]
	public BR_ResetBossScene[] ResetBossScene;

	// Token: 0x04001D1E RID: 7454
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x4001D1E")]
	public ParticleSystem PS_MagicCircle;

	// Token: 0x04001D1F RID: 7455
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x4001D1F")]
	public ParticleSystem PS_StartUp;

	// Token: 0x04001D20 RID: 7456
	[FieldOffset(Offset = "0x40")]
	[Token(Token = "0x4001D20")]
	public ParticleSystem PS_Teleport;

	// Token: 0x04001D21 RID: 7457
	[FieldOffset(Offset = "0x48")]
	[Token(Token = "0x4001D21")]
	public ParticleSystem PS_Target;

	// Token: 0x04001D22 RID: 7458
	[FieldOffset(Offset = "0x50")]
	[Token(Token = "0x4001D22")]
	public Light LG;

	// Token: 0x04001D23 RID: 7459
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x4001D23")]
	public Light LGTarget;

	// Token: 0x04001D24 RID: 7460
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x4001D24")]
	public GameObject SE_Loop;

	// Token: 0x04001D25 RID: 7461
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x4001D25")]
	public GameObject SE_Open;

	// Token: 0x04001D26 RID: 7462
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x4001D26")]
	public GameObject SE_Start;

	// Token: 0x04001D27 RID: 7463
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x4001D27")]
	public GameObject SE_Teleport;

	// Token: 0x04001D28 RID: 7464
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x4001D28")]
	public GameObject SE_Target;

	// Token: 0x04001D29 RID: 7465
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x4001D29")]
	protected SoundEffect g_SELoop;

	// Token: 0x04001D2A RID: 7466
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x4001D2A")]
	protected SoundEffect g_SE_Open;

	// Token: 0x04001D2B RID: 7467
	[FieldOffset(Offset = "0x98")]
	[Token(Token = "0x4001D2B")]
	protected SoundEffect g_SEStart;

	// Token: 0x04001D2C RID: 7468
	[FieldOffset(Offset = "0xA0")]
	[Token(Token = "0x4001D2C")]
	protected SoundEffect g_SETeleport;

	// Token: 0x04001D2D RID: 7469
	[FieldOffset(Offset = "0xA8")]
	[Token(Token = "0x4001D2D")]
	protected SoundEffect g_SETarget;

	// Token: 0x04001D2E RID: 7470
	[FieldOffset(Offset = "0xB0")]
	[Token(Token = "0x4001D2E")]
	protected bool g_bSEStart;

	// Token: 0x04001D2F RID: 7471
	[FieldOffset(Offset = "0xB4")]
	[Token(Token = "0x4001D2F")]
	protected float g_fSEStartVolume;

	// Token: 0x04001D30 RID: 7472
	[FieldOffset(Offset = "0xB8")]
	[Token(Token = "0x4001D30")]
	protected float g_fSEStartPitch = 0.5f;

	// Token: 0x04001D31 RID: 7473
	[Token(Token = "0x4001D31")]
	private const float g_fLightIntensity = 1.5f;

	// Token: 0x04001D32 RID: 7474
	[FieldOffset(Offset = "0xBC")]
	[Token(Token = "0x4001D32")]
	private float g_fLightIntensityVal;

	// Token: 0x04001D33 RID: 7475
	[FieldOffset(Offset = "0xC0")]
	[Token(Token = "0x4001D33")]
	private float g_fLGTargetIntensity;

	// Token: 0x04001D34 RID: 7476
	[FieldOffset(Offset = "0xC4")]
	[Token(Token = "0x4001D34")]
	private bool g_bStartUp;

	// Token: 0x04001D35 RID: 7477
	[Token(Token = "0x4001D35")]
	private const float g_fStartUpTime = 2.4f;

	// Token: 0x04001D36 RID: 7478
	[FieldOffset(Offset = "0xC8")]
	[Token(Token = "0x4001D36")]
	private float g_fStartUpTimeVal;

	// Token: 0x04001D37 RID: 7479
	[FieldOffset(Offset = "0xCC")]
	[Token(Token = "0x4001D37")]
	private float g_fLightIntensityAdd;

	// Token: 0x04001D38 RID: 7480
	[FieldOffset(Offset = "0xD0")]
	[Token(Token = "0x4001D38")]
	private int g_iLevel;

	// Token: 0x04001D39 RID: 7481
	[FieldOffset(Offset = "0xD8")]
	[Token(Token = "0x4001D39")]
	private Transform Target;

	// Token: 0x04001D3A RID: 7482
	[FieldOffset(Offset = "0xE0")]
	[Token(Token = "0x4001D3A")]
	private UIBattleSelect uiBattleSelect;

	// Token: 0x04001D3B RID: 7483
	[FieldOffset(Offset = "0xE8")]
	[Token(Token = "0x4001D3B")]
	private bool g_bTeleportEnding;
}
