using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x0200016F RID: 367
[Token(Token = "0x200016F")]
public class Teleport : PassiveEvent
{
	// Token: 0x0600120F RID: 4623 RVA: 0x000294A4 File Offset: 0x000276A4
	[Token(Token = "0x600120F")]
	[Address(RVA = "0x12FDC50", Offset = "0x12FCA50", VA = "0x1812FDC50", 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: 0x06001210 RID: 4624 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001210")]
	[Address(RVA = "0x12FDEA0", Offset = "0x12FCCA0", VA = "0x1812FDEA0", Slot = "6")]
	protected override void Update()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001211 RID: 4625 RVA: 0x00029608 File Offset: 0x00027808
	[Token(Token = "0x6001211")]
	[Address(RVA = "0x12FDBF0", Offset = "0x12FC9F0", VA = "0x1812FDBF0")]
	public 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);
	}

	// Token: 0x06001212 RID: 4626 RVA: 0x0002965C File Offset: 0x0002785C
	[Token(Token = "0x6001212")]
	[Address(RVA = "0x12FDAD0", Offset = "0x12FC8D0", VA = "0x1812FDAD0")]
	public 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: 0x06001213 RID: 4627 RVA: 0x000296EC File Offset: 0x000278EC
	[Token(Token = "0x6001213")]
	[Address(RVA = "0x12FDA90", Offset = "0x12FC890", VA = "0x1812FDA90")]
	public void CancelTeleport()
	{
		this.PS_Teleport.Stop(true);
		this.g_bStartUp = false;
		this.g_bSEStart = false;
	}

	// Token: 0x06001214 RID: 4628 RVA: 0x0002971C File Offset: 0x0002791C
	[Token(Token = "0x6001214")]
	[Address(RVA = "0x12FDBA0", Offset = "0x12FC9A0", VA = "0x1812FDBA0", 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: 0x06001215 RID: 4629 RVA: 0x00029750 File Offset: 0x00027950
	[Token(Token = "0x6001215")]
	[Address(RVA = "0x12FE760", Offset = "0x12FD560", VA = "0x1812FE760")]
	public Teleport()
	{
	}

	// Token: 0x04001BEA RID: 7146
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4001BEA")]
	public Transform Target;

	// Token: 0x04001BEB RID: 7147
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x4001BEB")]
	public ParticleSystem PS_MagicCircle;

	// Token: 0x04001BEC RID: 7148
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x4001BEC")]
	public ParticleSystem PS_Teleport;

	// Token: 0x04001BED RID: 7149
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x4001BED")]
	public ParticleSystem PS_Target;

	// Token: 0x04001BEE RID: 7150
	[FieldOffset(Offset = "0x40")]
	[Token(Token = "0x4001BEE")]
	public Light LG;

	// Token: 0x04001BEF RID: 7151
	[FieldOffset(Offset = "0x48")]
	[Token(Token = "0x4001BEF")]
	public Light LGTarget;

	// Token: 0x04001BF0 RID: 7152
	[FieldOffset(Offset = "0x50")]
	[Token(Token = "0x4001BF0")]
	public GameObject SE_Loop;

	// Token: 0x04001BF1 RID: 7153
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x4001BF1")]
	public GameObject SE_Start;

	// Token: 0x04001BF2 RID: 7154
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x4001BF2")]
	public GameObject SE_Teleport;

	// Token: 0x04001BF3 RID: 7155
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x4001BF3")]
	public GameObject SE_Target;

	// Token: 0x04001BF4 RID: 7156
	[Token(Token = "0x4001BF4")]
	private const float g_fLightIntensity = 1.5f;

	// Token: 0x04001BF5 RID: 7157
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x4001BF5")]
	private float g_fLightIntensityVal;

	// Token: 0x04001BF6 RID: 7158
	[FieldOffset(Offset = "0x74")]
	[Token(Token = "0x4001BF6")]
	private bool g_bStartUp;

	// Token: 0x04001BF7 RID: 7159
	[Token(Token = "0x4001BF7")]
	private const float g_fStartUpTime = 5f;

	// Token: 0x04001BF8 RID: 7160
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x4001BF8")]
	private float g_fStartUpTimeVal;

	// Token: 0x04001BF9 RID: 7161
	[FieldOffset(Offset = "0x7C")]
	[Token(Token = "0x4001BF9")]
	private float g_fLightIntensityAdd;

	// Token: 0x04001BFA RID: 7162
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x4001BFA")]
	private float g_fLGTargetIntensity;

	// Token: 0x04001BFB RID: 7163
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x4001BFB")]
	private SoundEffect g_SELoop;

	// Token: 0x04001BFC RID: 7164
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x4001BFC")]
	private SoundEffect g_SEStart;

	// Token: 0x04001BFD RID: 7165
	[FieldOffset(Offset = "0x98")]
	[Token(Token = "0x4001BFD")]
	private SoundEffect g_SETeleport;

	// Token: 0x04001BFE RID: 7166
	[FieldOffset(Offset = "0xA0")]
	[Token(Token = "0x4001BFE")]
	private SoundEffect g_SETarget;

	// Token: 0x04001BFF RID: 7167
	[FieldOffset(Offset = "0xA8")]
	[Token(Token = "0x4001BFF")]
	private bool g_bSEStart;

	// Token: 0x04001C00 RID: 7168
	[FieldOffset(Offset = "0xAC")]
	[Token(Token = "0x4001C00")]
	private float g_fSEStartVolume;

	// Token: 0x04001C01 RID: 7169
	[FieldOffset(Offset = "0xB0")]
	[Token(Token = "0x4001C01")]
	private float g_fSEStartPitch = 0.5f;

	// Token: 0x04001C02 RID: 7170
	[FieldOffset(Offset = "0xB4")]
	[Token(Token = "0x4001C02")]
	private int g_iLevel;

	// Token: 0x04001C03 RID: 7171
	[FieldOffset(Offset = "0xB8")]
	[Token(Token = "0x4001C03")]
	private BoxCollider g_BC;

	// Token: 0x04001C04 RID: 7172
	[FieldOffset(Offset = "0xC0")]
	[Token(Token = "0x4001C04")]
	public bool DefaultEnable = true;

	// Token: 0x04001C05 RID: 7173
	[FieldOffset(Offset = "0xC1")]
	[Token(Token = "0x4001C05")]
	private bool g_bEnable;
}
