BloodAndGore/Assets/Scripts/Effects/CustomLight.cs

26 lines
709 B
C#
Raw Normal View History

2019-08-21 22:14:23 +02:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Saltosion.OneWeapon.Utils;
namespace Saltosion.OneWeapon.Effects {
[ExecuteInEditMode]
public class CustomLight : MonoBehaviour {
[Range(0, 20)]
public float LightSize = 10;
[Range(0, 2)]
public float LightIntensity = 1;
public Color LightTint = new Color(1, 1, 1, 1);
private LightUpdater Updater;
void Start() {
Updater = GameObject.FindGameObjectWithTag("LightUpdater").GetComponent<LightUpdater>();
Updater.RegisterLight(this);
}
void OnDestroy() {
Updater.UnregisterLight(this);
}
}
}