using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x020001D7 RID: 471
[Token(Token = "0x20001D7")]
public class Level04LightMagicController : MonoBehaviour
{
	// Token: 0x06001462 RID: 5218 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001462")]
	[Address(RVA = "0x1055170", Offset = "0x1054170", VA = "0x181055170")]
	private void Start()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001463 RID: 5219 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001463")]
	[Address(RVA = "0x10558E0", Offset = "0x10548E0", VA = "0x1810558E0")]
	private void Update()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001464 RID: 5220 RVA: 0x0002E748 File Offset: 0x0002C948
	[Token(Token = "0x6001464")]
	[Address(RVA = "0x1055640", Offset = "0x1054640", VA = "0x181055640")]
	private void UpdateFlashing(float fDeltaTime)
	{
		float num = this.g_fLightFrequencyVal;
		Light plight = this.PLight;
		if (num <= 0.09f)
		{
			if (plight.enabled)
			{
				Light plight2 = this.PLight;
				float intensity = plight2.intensity;
				float num2 = this.g_fPLightChangeIntensity;
				float num3 = fDeltaTime * 2.4f;
				num2 = Mathf.Lerp(intensity, num2, num3);
				plight2.intensity = num2;
			}
			float num4 = fDeltaTime * 2.4f;
			if (!this.SLight.enabled)
			{
				goto IL_EE;
			}
			Light slight = this.SLight;
			float intensity2 = slight.intensity;
			float num5 = this.g_fSLightChangeIntensity;
			num5 = Mathf.Lerp(intensity2, num5, num4);
			slight.intensity = num5;
		}
		this.g_fLightFrequencyVal = num;
		if (plight.enabled)
		{
			float num6 = UnityEngine.Random.Range(-0.6f, 0.6f);
			this.g_fPLightChangeIntensity = num6;
		}
		if (this.SLight.enabled)
		{
			float num7 = UnityEngine.Random.Range(-0.6f, 0.6f);
			this.g_fSLightChangeIntensity = num7;
		}
		IL_EE:
		this.g_fLightFrequencyVal = fDeltaTime;
	}

	// Token: 0x06001465 RID: 5221 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001465")]
	[Address(RVA = "0x10557F0", Offset = "0x10547F0", VA = "0x1810557F0")]
	private void UpdateFloat(float fDeltaTime)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001466 RID: 5222 RVA: 0x0002E850 File Offset: 0x0002CA50
	[Token(Token = "0x6001466")]
	[Address(RVA = "0x1055150", Offset = "0x1054150", VA = "0x181055150")]
	public void SetStartActive()
	{
		this.g_Status = (Level04LightMagicController.LMSTATUS)((ulong)1L);
		this.g_fWaitTime = 2f;
	}

	// Token: 0x06001467 RID: 5223 RVA: 0x0002E874 File Offset: 0x0002CA74
	[Token(Token = "0x6001467")]
	[Address(RVA = "0x1055070", Offset = "0x1054070", VA = "0x181055070")]
	public void SetDeactivate(int iIndex)
	{
		Level04LightMagic[] lightMagic = this.LightMagic;
		Debug.LogError("LightMagic編號錯誤");
		Level04LightMagic[] lightMagic2 = this.LightMagic;
		this.g_Status = (Level04LightMagicController.LMSTATUS)((ulong)3L);
		this.g_fWaitTime = 1.2f;
		Transform transform = lightMagic2[iIndex].transform;
		this.TargetPos = transform;
		throw new NullReferenceException();
	}

	// Token: 0x06001468 RID: 5224 RVA: 0x0002E8C8 File Offset: 0x0002CAC8
	[Token(Token = "0x6001468")]
	[Address(RVA = "0x1054FF0", Offset = "0x1053FF0", VA = "0x181054FF0")]
	public Level04LightMagicController.LMSTATUS GetStatus()
	{
		return this.g_Status;
	}

	// Token: 0x06001469 RID: 5225 RVA: 0x0002E8DC File Offset: 0x0002CADC
	[Token(Token = "0x6001469")]
	[Address(RVA = "0x1054F70", Offset = "0x1053F70", VA = "0x181054F70")]
	public void EventUnactive()
	{
		Level04LightMagic[] lightMagic = this.LightMagic;
		int num = 0;
		if (num < lightMagic.Length)
		{
			lightMagic[num].Check();
			Level04LightMagic[] lightMagic2 = this.LightMagic;
			num++;
		}
	}

	// Token: 0x0600146A RID: 5226 RVA: 0x0002E918 File Offset: 0x0002CB18
	[Token(Token = "0x600146A")]
	[Address(RVA = "0x1055000", Offset = "0x1054000", VA = "0x181055000")]
	private void OnTriggerEnter(Collider other)
	{
		if (this.g_Status == Level04LightMagicController.LMSTATUS.ACTIVE && other.CompareTag("Player"))
		{
			this.g_Status = (Level04LightMagicController.LMSTATUS)((ulong)0L);
		}
	}

	// Token: 0x0600146B RID: 5227 RVA: 0x0002E94C File Offset: 0x0002CB4C
	[Token(Token = "0x600146B")]
	[Address(RVA = "0x1056D00", Offset = "0x1055D00", VA = "0x181056D00")]
	public Level04LightMagicController()
	{
	}

	// Token: 0x04001EE2 RID: 7906
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x4001EE2")]
	public Level04LightMagic[] LightMagic;

	// Token: 0x04001EE3 RID: 7907
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4001EE3")]
	public CrystalBall[] Crystal;

	// Token: 0x04001EE4 RID: 7908
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x4001EE4")]
	public Transform Pos_LightBall;

	// Token: 0x04001EE5 RID: 7909
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x4001EE5")]
	public Transform Pos_LerpTarget;

	// Token: 0x04001EE6 RID: 7910
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x4001EE6")]
	private Transform TargetPos;

	// Token: 0x04001EE7 RID: 7911
	[FieldOffset(Offset = "0x40")]
	[Token(Token = "0x4001EE7")]
	private Transform PlayerPos;

	// Token: 0x04001EE8 RID: 7912
	[FieldOffset(Offset = "0x48")]
	[Token(Token = "0x4001EE8")]
	private Transform AimPos;

	// Token: 0x04001EE9 RID: 7913
	[FieldOffset(Offset = "0x50")]
	[Token(Token = "0x4001EE9")]
	private Vector3 g_v3MovePos;

	// Token: 0x04001EEA RID: 7914
	[Token(Token = "0x4001EEA")]
	private const float g_fPosHeight = 2.7f;

	// Token: 0x04001EEB RID: 7915
	[FieldOffset(Offset = "0x5C")]
	[Token(Token = "0x4001EEB")]
	private Vector3 g_v3Float;

	// Token: 0x04001EEC RID: 7916
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x4001EEC")]
	private float g_fFloatX;

	// Token: 0x04001EED RID: 7917
	[FieldOffset(Offset = "0x6C")]
	[Token(Token = "0x4001EED")]
	private float g_fFloatY;

	// Token: 0x04001EEE RID: 7918
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x4001EEE")]
	private float g_fFloatZ;

	// Token: 0x04001EEF RID: 7919
	[FieldOffset(Offset = "0x74")]
	[Token(Token = "0x4001EEF")]
	private float g_fFloatSpeedX;

	// Token: 0x04001EF0 RID: 7920
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x4001EF0")]
	private float g_fFloatSpeedY;

	// Token: 0x04001EF1 RID: 7921
	[FieldOffset(Offset = "0x7C")]
	[Token(Token = "0x4001EF1")]
	private float g_fFloatSpeedZ;

	// Token: 0x04001EF2 RID: 7922
	[Token(Token = "0x4001EF2")]
	private const float g_fFloatRange = 0.3f;

	// Token: 0x04001EF3 RID: 7923
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x4001EF3")]
	private float g_fPI2;

	// Token: 0x04001EF4 RID: 7924
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x4001EF4")]
	public ParticleSystem PS_LightBall;

	// Token: 0x04001EF5 RID: 7925
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x4001EF5")]
	public Light PLight;

	// Token: 0x04001EF6 RID: 7926
	[FieldOffset(Offset = "0x98")]
	[Token(Token = "0x4001EF6")]
	private float g_fPLightDefaultIntensity;

	// Token: 0x04001EF7 RID: 7927
	[FieldOffset(Offset = "0x9C")]
	[Token(Token = "0x4001EF7")]
	private float g_fPLightChangeIntensity;

	// Token: 0x04001EF8 RID: 7928
	[Token(Token = "0x4001EF8")]
	private const float g_fLightFrequency = 0.09f;

	// Token: 0x04001EF9 RID: 7929
	[FieldOffset(Offset = "0xA0")]
	[Token(Token = "0x4001EF9")]
	private float g_fLightFrequencyVal;

	// Token: 0x04001EFA RID: 7930
	[FieldOffset(Offset = "0xA4")]
	[Token(Token = "0x4001EFA")]
	private float g_fPLightDefaultRange;

	// Token: 0x04001EFB RID: 7931
	[FieldOffset(Offset = "0xA8")]
	[Token(Token = "0x4001EFB")]
	private float g_fPLightRange;

	// Token: 0x04001EFC RID: 7932
	[Token(Token = "0x4001EFC")]
	private const float g_fLightSpeed = 2.4f;

	// Token: 0x04001EFD RID: 7933
	[FieldOffset(Offset = "0xB0")]
	[Token(Token = "0x4001EFD")]
	public Light SLight;

	// Token: 0x04001EFE RID: 7934
	[FieldOffset(Offset = "0xB8")]
	[Token(Token = "0x4001EFE")]
	private float g_fSLightDefaultIntensity;

	// Token: 0x04001EFF RID: 7935
	[FieldOffset(Offset = "0xBC")]
	[Token(Token = "0x4001EFF")]
	private float g_fSLightChangeIntensity;

	// Token: 0x04001F00 RID: 7936
	[FieldOffset(Offset = "0xC0")]
	[Token(Token = "0x4001F00")]
	private float g_fSLightDefaultRange;

	// Token: 0x04001F01 RID: 7937
	[FieldOffset(Offset = "0xC4")]
	[Token(Token = "0x4001F01")]
	private float g_fSLightRange;

	// Token: 0x04001F02 RID: 7938
	[FieldOffset(Offset = "0xC8")]
	[Token(Token = "0x4001F02")]
	public Light CLight;

	// Token: 0x04001F03 RID: 7939
	[FieldOffset(Offset = "0xD0")]
	[Token(Token = "0x4001F03")]
	private float g_fCLightDefaultIntensity;

	// Token: 0x04001F04 RID: 7940
	[FieldOffset(Offset = "0xD4")]
	[Token(Token = "0x4001F04")]
	public float PlayerLightRange = 24f;

	// Token: 0x04001F05 RID: 7941
	[FieldOffset(Offset = "0xD8")]
	[Token(Token = "0x4001F05")]
	public GameObject SE_LightBallLoop;

	// Token: 0x04001F06 RID: 7942
	[FieldOffset(Offset = "0xE0")]
	[Token(Token = "0x4001F06")]
	private SoundEffect g_SELightBallLoop;

	// Token: 0x04001F07 RID: 7943
	[FieldOffset(Offset = "0xE8")]
	[Token(Token = "0x4001F07")]
	private float g_fWaitTime;

	// Token: 0x04001F08 RID: 7944
	[FieldOffset(Offset = "0xEC")]
	[Token(Token = "0x4001F08")]
	private Level04LightMagicController.LMSTATUS g_Status;

	// Token: 0x020001D8 RID: 472
	[Token(Token = "0x20001D8")]
	public enum LMSTATUS
	{
		// Token: 0x04001F0A RID: 7946
		[Token(Token = "0x4001F0A")]
		UNACTIVE,
		// Token: 0x04001F0B RID: 7947
		[Token(Token = "0x4001F0B")]
		STARTACTIVE,
		// Token: 0x04001F0C RID: 7948
		[Token(Token = "0x4001F0C")]
		ACTIVE,
		// Token: 0x04001F0D RID: 7949
		[Token(Token = "0x4001F0D")]
		DEACTIVATE
	}
}
