using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x0200019C RID: 412
[Token(Token = "0x200019C")]
public class Teleport : PassiveEvent
{
	// Token: 0x0600138E RID: 5006 RVA: 0x0002C614 File Offset: 0x0002A814
	[Token(Token = "0x600138E")]
	[Address(RVA = "0xF5B290", Offset = "0xF5A290", VA = "0x180F5B290", Slot = "4")]
	protected override void Start()
	{
		base..ctor();
		Light lgtarget = this.LGTarget;
		bool defaultEnable = this.DefaultEnable;
		this.g_bEnable = defaultEnable;
		this.g_fLightIntensityVal = 1.5f;
		int num = 0;
		lgtarget.enabled = num != 0;
		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_Start = this.SE_Start;
		Transform transform2 = base.transform;
		SoundEffect soundEffectOfPrefabs2 = Common.GetSoundEffectOfPrefabs(se_Start, transform2);
		this.g_SEStart = soundEffectOfPrefabs2;
		Game.BindStageTimeScale(this.g_SEStart);
		GameObject se_Teleport = this.SE_Teleport;
		Transform transform3 = base.transform;
		SoundEffect soundEffectOfPrefabs3 = Common.GetSoundEffectOfPrefabs(se_Teleport, transform3);
		this.g_SETeleport = soundEffectOfPrefabs3;
		Game.BindStageTimeScale(this.g_SETeleport);
		Transform target = this.Target;
		GameObject se_Target = this.SE_Target;
		Transform transform4 = target.transform;
		SoundEffect soundEffectOfPrefabs4 = Common.GetSoundEffectOfPrefabs(se_Target, transform4);
		this.g_SETarget = soundEffectOfPrefabs4;
		Game.BindStageTimeScale(this.g_SETarget);
		BoxCollider component = base.GetComponent<BoxCollider>();
		this.g_BC = component;
		if (!this.g_bEnable)
		{
			Light lg = this.LG;
			int num2 = 0;
			lg.enabled = num2 != 0;
			this.PS_MagicCircle.Stop(true);
			BoxCollider boxCollider = this.g_BC;
			int num3 = 0;
			boxCollider.enabled = num3 != 0;
			return;
		}
		this.g_SELoop.PlayRandom(1f, 1f);
	}

	// Token: 0x0600138F RID: 5007 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600138F")]
	[Address(RVA = "0xF5B4E0", Offset = "0xF5A4E0", VA = "0x180F5B4E0", Slot = "6")]
	protected override void Update()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001390 RID: 5008 RVA: 0x0002C778 File Offset: 0x0002A978
	[Token(Token = "0x6001390")]
	[Address(RVA = "0xF5B120", Offset = "0xF5A120", VA = "0x180F5B120", Slot = "8")]
	public virtual void StartUp()
	{
		this.PS_Teleport.Play(true);
		SoundEffect soundEffect = this.g_SEStart;
		int num = 0;
		this.g_bStartUp = true;
		this.g_iLevel = num;
		this.g_fStartUpTimeVal = (float)num;
		this.g_bSEStart = true;
		soundEffect.PlayRandom(1f, 1f);
		SceneEvent[] startUpEvent = this.StartUpEvent;
		if (startUpEvent.Length != num && num < startUpEvent.Length)
		{
			SceneEvent sceneEvent = startUpEvent[num];
			int num2 = 0;
			if (sceneEvent != num2)
			{
				this.StartUpEvent[num].OpenEvent();
			}
			SceneEvent[] startUpEvent2 = this.StartUpEvent;
			num++;
		}
	}

	// Token: 0x06001391 RID: 5009 RVA: 0x0002C818 File Offset: 0x0002AA18
	[Token(Token = "0x6001391")]
	[Address(RVA = "0xF5B000", Offset = "0xF5A000", VA = "0x180F5B000", Slot = "9")]
	public virtual void SetEnable(bool bEnable)
	{
		this.g_bEnable = bEnable;
		SoundEffect soundEffect = this.g_SELoop;
		if (!bEnable)
		{
			soundEffect.Stop();
			Light lg = this.LG;
			int num = 0;
			lg.enabled = num != 0;
			this.PS_MagicCircle.Stop(true);
			BoxCollider boxCollider = this.g_BC;
			int num2 = 0;
			boxCollider.enabled = num2 != 0;
			return;
		}
		soundEffect.PlayRandom(1f, 1f);
		this.LG.enabled = true;
		this.PS_MagicCircle.Play(true);
		this.g_BC.enabled = true;
	}

	// Token: 0x06001392 RID: 5010 RVA: 0x0002C8A8 File Offset: 0x0002AAA8
	[Token(Token = "0x6001392")]
	[Address(RVA = "0xF5AFC0", Offset = "0xF59FC0", VA = "0x180F5AFC0")]
	public void CancelTeleport()
	{
		this.PS_Teleport.Stop(true);
		this.g_bStartUp = false;
		this.g_bSEStart = false;
	}

	// Token: 0x06001393 RID: 5011 RVA: 0x0002C8D8 File Offset: 0x0002AAD8
	[Token(Token = "0x6001393")]
	[Address(RVA = "0xF5B0D0", Offset = "0xF5A0D0", VA = "0x180F5B0D0", Slot = "7")]
	public override void SetTimeScale(float fScaleTime)
	{
		Common.SetEffectTimeScale(this.PS_MagicCircle, fScaleTime);
		Common.SetEffectTimeScale(this.PS_Teleport, fScaleTime);
		Common.SetEffectTimeScale(this.PS_Target, fScaleTime);
	}

	// Token: 0x06001394 RID: 5012 RVA: 0x0002C90C File Offset: 0x0002AB0C
	[Token(Token = "0x6001394")]
	[Address(RVA = "0xF5AFA0", Offset = "0xF59FA0", VA = "0x180F5AFA0")]
	public Teleport()
	{
	}

	// Token: 0x04001D7F RID: 7551
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4001D7F")]
	public Transform Target;

	// Token: 0x04001D80 RID: 7552
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x4001D80")]
	public ParticleSystem PS_MagicCircle;

	// Token: 0x04001D81 RID: 7553
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x4001D81")]
	public ParticleSystem PS_Teleport;

	// Token: 0x04001D82 RID: 7554
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x4001D82")]
	public ParticleSystem PS_Target;

	// Token: 0x04001D83 RID: 7555
	[FieldOffset(Offset = "0x40")]
	[Token(Token = "0x4001D83")]
	public Light LG;

	// Token: 0x04001D84 RID: 7556
	[FieldOffset(Offset = "0x48")]
	[Token(Token = "0x4001D84")]
	public Light LGTarget;

	// Token: 0x04001D85 RID: 7557
	[FieldOffset(Offset = "0x50")]
	[Token(Token = "0x4001D85")]
	public GameObject SE_Loop;

	// Token: 0x04001D86 RID: 7558
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x4001D86")]
	public GameObject SE_Start;

	// Token: 0x04001D87 RID: 7559
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x4001D87")]
	public GameObject SE_Teleport;

	// Token: 0x04001D88 RID: 7560
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x4001D88")]
	public GameObject SE_Target;

	// Token: 0x04001D89 RID: 7561
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x4001D89")]
	public SceneEvent[] StartUpEvent;

	// Token: 0x04001D8A RID: 7562
	[Token(Token = "0x4001D8A")]
	protected const float g_fLightIntensity = 1.5f;

	// Token: 0x04001D8B RID: 7563
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x4001D8B")]
	protected float g_fLightIntensityVal;

	// Token: 0x04001D8C RID: 7564
	[FieldOffset(Offset = "0x7C")]
	[Token(Token = "0x4001D8C")]
	protected bool g_bStartUp;

	// Token: 0x04001D8D RID: 7565
	[Token(Token = "0x4001D8D")]
	private const float g_fStartUpTime = 5f;

	// Token: 0x04001D8E RID: 7566
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x4001D8E")]
	protected float g_fStartUpTimeVal;

	// Token: 0x04001D8F RID: 7567
	[FieldOffset(Offset = "0x84")]
	[Token(Token = "0x4001D8F")]
	protected float g_fLightIntensityAdd;

	// Token: 0x04001D90 RID: 7568
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x4001D90")]
	protected float g_fLGTargetIntensity;

	// Token: 0x04001D91 RID: 7569
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x4001D91")]
	protected SoundEffect g_SELoop;

	// Token: 0x04001D92 RID: 7570
	[FieldOffset(Offset = "0x98")]
	[Token(Token = "0x4001D92")]
	protected SoundEffect g_SEStart;

	// Token: 0x04001D93 RID: 7571
	[FieldOffset(Offset = "0xA0")]
	[Token(Token = "0x4001D93")]
	protected SoundEffect g_SETeleport;

	// Token: 0x04001D94 RID: 7572
	[FieldOffset(Offset = "0xA8")]
	[Token(Token = "0x4001D94")]
	protected SoundEffect g_SETarget;

	// Token: 0x04001D95 RID: 7573
	[FieldOffset(Offset = "0xB0")]
	[Token(Token = "0x4001D95")]
	protected bool g_bSEStart;

	// Token: 0x04001D96 RID: 7574
	[FieldOffset(Offset = "0xB4")]
	[Token(Token = "0x4001D96")]
	protected float g_fSEStartVolume;

	// Token: 0x04001D97 RID: 7575
	[FieldOffset(Offset = "0xB8")]
	[Token(Token = "0x4001D97")]
	protected float g_fSEStartPitch = 0.5f;

	// Token: 0x04001D98 RID: 7576
	[FieldOffset(Offset = "0xBC")]
	[Token(Token = "0x4001D98")]
	protected int g_iLevel;

	// Token: 0x04001D99 RID: 7577
	[FieldOffset(Offset = "0xC0")]
	[Token(Token = "0x4001D99")]
	protected BoxCollider g_BC;

	// Token: 0x04001D9A RID: 7578
	[FieldOffset(Offset = "0xC8")]
	[Token(Token = "0x4001D9A")]
	public bool DefaultEnable = true;

	// Token: 0x04001D9B RID: 7579
	[FieldOffset(Offset = "0xC9")]
	[Token(Token = "0x4001D9B")]
	protected bool g_bEnable;
}
