SequencerCommandLightIntensity.cs
Code: Select all
using UnityEngine;
namespace PixelCrushers.DialogueSystem.SequencerCommands
{
/// <summary>
/// Sequencer command: LightIntensity(subject, intensity)
/// </summary>
public class SequencerCommandLightIntensity : SequencerCommand
{
private void Awake()
{
var subject = GetSubject(0);
var intensity = GetParameterAsFloat(1);
var light = (subject != null) ? subject.GetComponent<Light>() : null;
if (light != null) light.intensity = intensity;
Stop();
}
}
}