26 lines
709 B
C#
26 lines
709 B
C#
|
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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|