using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x02000339 RID: 825
[Token(Token = "0x2000339")]
[RequireComponent(typeof(Light))]
public class CFX_LightIntensityFade : MonoBehaviour
{
	// Token: 0x06002093 RID: 8339 RVA: 0x0004D99C File Offset: 0x0004BB9C
	[Token(Token = "0x6002093")]
	[Address(RVA = "0x134A5C0", Offset = "0x13493C0", VA = "0x18134A5C0")]
	private void Start()
	{
		float intensity = base.GetComponent<Light>().intensity;
		this.baseIntensity = intensity;
	}

	// Token: 0x06002094 RID: 8340 RVA: 0x0004D9C4 File Offset: 0x0004BBC4
	[Token(Token = "0x6002094")]
	[Address(RVA = "0x134A550", Offset = "0x1349350", VA = "0x18134A550")]
	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: 0x06002095 RID: 8341 RVA: 0x0004DA08 File Offset: 0x0004BC08
	[Token(Token = "0x6002095")]
	[Address(RVA = "0x134A620", Offset = "0x1349420", VA = "0x18134A620")]
	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: 0x06002096 RID: 8342 RVA: 0x0004DAA4 File Offset: 0x0004BCA4
	[Token(Token = "0x6002096")]
	[Address(RVA = "0xBE5C30", Offset = "0xBE4A30", VA = "0x180BE5C30")]
	public CFX_LightIntensityFade()
	{
	}

	// Token: 0x040029DC RID: 10716
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x40029DC")]
	public float duration = 1f;

	// Token: 0x040029DD RID: 10717
	[FieldOffset(Offset = "0x1C")]
	[Token(Token = "0x40029DD")]
	public float delay;

	// Token: 0x040029DE RID: 10718
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x40029DE")]
	public float finalIntensity;

	// Token: 0x040029DF RID: 10719
	[FieldOffset(Offset = "0x24")]
	[Token(Token = "0x40029DF")]
	private float baseIntensity;

	// Token: 0x040029E0 RID: 10720
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x40029E0")]
	public bool autodestruct;

	// Token: 0x040029E1 RID: 10721
	[FieldOffset(Offset = "0x2C")]
	[Token(Token = "0x40029E1")]
	private float p_lifetime;

	// Token: 0x040029E2 RID: 10722
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x40029E2")]
	private float p_delay;
}
