using UnityEngine;

namespace pdinklag.CPW.Common
{    
    /// <summary>
     /// Controls a light.
     /// </summary>
    public interface ILight
    {
        /// <summary>
        /// Fades the spotlight to the specified color.
        /// </summary>
        /// <param name="ctx">the execution context</param>
        /// <param name="color">the target color</param>
        /// <param name="fadeDuration">the duration of the fading</param>
        /// <returns>the corresponding yield instruction</returns>
        YieldInstructionCode SetColor(IContext ctx, Color color, float duration);

        /// <summary>
        /// Sets the spotlight to the specified color.
        /// </summary>
        /// <param name="color">the target color</param>
        void SetColor(Color color);
    }
}
