using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class StressLight : MonoBehaviour {

    public Material onMaterial;
    public Material offMaterial;
    public MeshRenderer lightRenderer;

    [ReadOnly] public bool onCurrently;

    public void SetOn (bool on)
    {
        if (on != onCurrently)
        {
            lightRenderer.material = ( on ) ? onMaterial : offMaterial;
            onCurrently = on;
        }
    }
}
