using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x02000391 RID: 913
[Token(Token = "0x2000391")]
[RequireComponent(typeof(Light))]
public class CFX_LightIntensityFade : MonoBehaviour
{
	// Token: 0x0600235C RID: 9052 RVA: 0x00054C1C File Offset: 0x00052E1C
	[Token(Token = "0x600235C")]
	[Address(RVA = "0xB8AEA0", Offset = "0xB89EA0", VA = "0x180B8AEA0")]
	private void Start()
	{
		float intensity = base.GetComponent<Light>().intensity;
		this.baseIntensity = intensity;
	}

	// Token: 0x0600235D RID: 9053 RVA: 0x00054C44 File Offset: 0x00052E44
	[Token(Token = "0x600235D")]
	[Address(RVA = "0xB8AE30", Offset = "0xB89E30", VA = "0x180B8AE30")]
	private void OnEnable()
	{
		float num = this.delay;
		int num2 = 0;
		this.p_lifetime = 0f;
		this.p_delay = num;
		if (num > (float)num2)
		{
			Light component = base.GetComponent<Light>();
			int num3 = 0;
			component.enabled = num3 != 0;
			return;
		}
	}

	// Token: 0x0600235E RID: 9054 RVA: 0x00054C88 File Offset: 0x00052E88
	[Token(Token = "0x600235E")]
	[Address(RVA = "0xB8AF00", Offset = "0xB89F00", VA = "0x180B8AF00")]
	private void Update()
	{
		float num = this.p_delay;
		int num2 = 0;
		if (num <= (float)num2)
		{
			float num3 = this.p_lifetime;
			if (this.autodestruct)
			{
				UnityEngine.Object.Destroy(base.gameObject);
			}
			return;
		}
		float deltaTime = Time.deltaTime;
		this.p_delay = num;
		base.GetComponent<Light>().enabled = true;
		throw new NullReferenceException();
	}

	// Token: 0x0600235F RID: 9055 RVA: 0x00054D24 File Offset: 0x00052F24
	[Token(Token = "0x600235F")]
	[Address(RVA = "0x503840", Offset = "0x502840", VA = "0x180503840")]
	public CFX_LightIntensityFade()
	{
	}

	// Token: 0x04002CC6 RID: 11462
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x4002CC6")]
	public float duration = 1f;

	// Token: 0x04002CC7 RID: 11463
	[FieldOffset(Offset = "0x1C")]
	[Token(Token = "0x4002CC7")]
	public float delay;

	// Token: 0x04002CC8 RID: 11464
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4002CC8")]
	public float finalIntensity;

	// Token: 0x04002CC9 RID: 11465
	[FieldOffset(Offset = "0x24")]
	[Token(Token = "0x4002CC9")]
	private float baseIntensity;

	// Token: 0x04002CCA RID: 11466
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x4002CCA")]
	public bool autodestruct;

	// Token: 0x04002CCB RID: 11467
	[FieldOffset(Offset = "0x2C")]
	[Token(Token = "0x4002CCB")]
	private float p_lifetime;

	// Token: 0x04002CCC RID: 11468
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x4002CCC")]
	private float p_delay;
}
