using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x020001FC RID: 508
[Token(Token = "0x20001FC")]
public class RadiusPlayerCheck : MonoBehaviour
{
	// Token: 0x060014EC RID: 5356 RVA: 0x0002F9E0 File Offset: 0x0002DBE0
	[Token(Token = "0x60014EC")]
	[Address(RVA = "0xEBF170", Offset = "0xEBE170", VA = "0x180EBF170")]
	public void Init()
	{
		float radius = base.GetComponent<SphereCollider>().radius;
		this.g_fRadius = radius;
		this.g_bEnter = false;
		this.g_fPrevSwitchValue = 0f;
		Game.OnVolumeSettingsChanged += new Action(this.UpdateVolume);
		RadiusPlayerCheck.PlayerCheckType type = this.Type;
		if (type != RadiusPlayerCheck.PlayerCheckType.BGSE)
		{
			if (type == RadiusPlayerCheck.PlayerCheckType.Damage)
			{
				AttackData component = base.transform.GetComponent<AttackData>();
				this.g_AD = component;
				AttackData attackData = this.g_AD;
				int num = 0;
				if (attackData == num)
				{
					Debug.Log("攻擊資料錯誤");
				}
				Transform transform = base.transform.Find("SoundEffect");
				int num2 = 0;
				if (transform != num2)
				{
					SoundEffect component2 = transform.GetComponent<SoundEffect>();
					this.g_SE = component2;
					SoundEffect soundEffect = this.g_SE;
					int num3 = 0;
					if (!(soundEffect == num3))
					{
						this.g_SE.InitData();
						Game.BindStageTimeScale(this.g_SE);
					}
					string name = base.name;
					Debug.LogError("背景音效錯誤 : " + name);
				}
				Transform transform2 = base.transform.Find("PS");
				int num4 = 0;
				if (transform2 != num4)
				{
					ParticleSystem component3 = transform2.GetComponent<ParticleSystem>();
					this.g_PS = component3;
					ParticleSystem particleSystem = this.g_PS;
					int num5 = 0;
					if (particleSystem == num5)
					{
						string name2 = base.name;
						Debug.LogError("挨打特效錯誤 : " + name2);
					}
				}
				this.g_fStageTimeScale = 1f;
			}
			return;
		}
		Transform transform3 = base.transform.Find("SoundEffect");
		int num6 = 0;
		if (transform3 != num6)
		{
			SoundEffect component4 = transform3.GetComponent<SoundEffect>();
			this.g_SE = component4;
			SoundEffect soundEffect2 = this.g_SE;
			int num7 = 0;
			if (!(soundEffect2 == num7))
			{
				this.g_SE.InitData();
				Game.BindStageTimeScale(this.g_SE);
				return;
			}
		}
		string name3 = base.name;
		Debug.LogError("背景音效錯誤 : " + name3);
	}

	// Token: 0x060014ED RID: 5357 RVA: 0x0002FBD0 File Offset: 0x0002DDD0
	[Token(Token = "0x60014ED")]
	[Address(RVA = "0xEBFAD0", Offset = "0xEBEAD0", VA = "0x180EBFAD0")]
	private void UpdateVolume(VolumeSettings settings)
	{
		if (this.g_SE)
		{
			this.g_SE.ResetVolume();
		}
	}

	// Token: 0x060014EE RID: 5358 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60014EE")]
	[Address(RVA = "0xEBFB50", Offset = "0xEBEB50", VA = "0x180EBFB50")]
	private void Update()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060014EF RID: 5359 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60014EF")]
	[Address(RVA = "0xEBF7E0", Offset = "0xEBE7E0", VA = "0x180EBF7E0")]
	private void OnTriggerEnter(Collider collision)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060014F0 RID: 5360 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60014F0")]
	[Address(RVA = "0xEBF920", Offset = "0xEBE920", VA = "0x180EBF920")]
	private void OnTriggerExit(Collider collision)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060014F1 RID: 5361 RVA: 0x0002FBFC File Offset: 0x0002DDFC
	[Token(Token = "0x60014F1")]
	[Address(RVA = "0xEBF730", Offset = "0xEBE730", VA = "0x180EBF730")]
	private void OnDestroy()
	{
		Game.OnVolumeSettingsChanged -= new Action(this.UpdateVolume);
	}

	// Token: 0x060014F2 RID: 5362 RVA: 0x0002FC1C File Offset: 0x0002DE1C
	[Token(Token = "0x60014F2")]
	[Address(RVA = "0xEC0170", Offset = "0xEBF170", VA = "0x180EC0170")]
	public RadiusPlayerCheck()
	{
	}

	// Token: 0x04001FD5 RID: 8149
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x4001FD5")]
	private float g_fRadius;

	// Token: 0x04001FD6 RID: 8150
	[FieldOffset(Offset = "0x1C")]
	[Token(Token = "0x4001FD6")]
	private bool g_bEnter;

	// Token: 0x04001FD7 RID: 8151
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4001FD7")]
	private float g_fPrevSwitchValue;

	// Token: 0x04001FD8 RID: 8152
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x4001FD8")]
	private SoundEffect g_SE;

	// Token: 0x04001FD9 RID: 8153
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x4001FD9")]
	private AttackData g_AD;

	// Token: 0x04001FDA RID: 8154
	[Token(Token = "0x4001FDA")]
	private const float g_fAttackFrequency = 0.3f;

	// Token: 0x04001FDB RID: 8155
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x4001FDB")]
	private float g_fAttackFrequencyVal;

	// Token: 0x04001FDC RID: 8156
	[FieldOffset(Offset = "0x40")]
	[Token(Token = "0x4001FDC")]
	private ParticleSystem g_PS;

	// Token: 0x04001FDD RID: 8157
	[FieldOffset(Offset = "0x48")]
	[Token(Token = "0x4001FDD")]
	private float g_fStageTimeScale = 1f;

	// Token: 0x04001FDE RID: 8158
	[FieldOffset(Offset = "0x4C")]
	[Token(Token = "0x4001FDE")]
	public RadiusPlayerCheck.PlayerCheckType Type;

	// Token: 0x020001FD RID: 509
	[Token(Token = "0x20001FD")]
	public enum PlayerCheckType
	{
		// Token: 0x04001FE0 RID: 8160
		[Token(Token = "0x4001FE0")]
		Default,
		// Token: 0x04001FE1 RID: 8161
		[Token(Token = "0x4001FE1")]
		PlayerShadow,
		// Token: 0x04001FE2 RID: 8162
		[Token(Token = "0x4001FE2")]
		ReplyMana,
		// Token: 0x04001FE3 RID: 8163
		[Token(Token = "0x4001FE3")]
		BGSE,
		// Token: 0x04001FE4 RID: 8164
		[Token(Token = "0x4001FE4")]
		WindLayer,
		// Token: 0x04001FE5 RID: 8165
		[Token(Token = "0x4001FE5")]
		Damage
	}
}
