soundvision/UnityProject/Assets/Scenes/Examples/Max Silly Demos/Scripts/LightMapper.cs
2020-01-13 16:20:47 +01:00

16 lines
390 B
C#

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;
}
}