soundvision/UnityProject/Assets/Scenes/Examples/Complex Demos/Scripts/LightMapper.cs

17 lines
390 B
C#
Raw Permalink Normal View History

2020-01-13 15:20:47 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LightMapper : MonoBehaviour
{
[SerializeField] private Light light;
[SerializeField] private float minimum = 100;
[SerializeField] private float multiplier = 100;
public void OnEnergyChanged(float energy)
{
light.intensity = energy * multiplier + minimum;
}
}