/// <summary>
 /// Reset to the default state
 /// </summary>
 public void Reset()
 {
     _mOnComplete   = null;
     _mIsLoaded     = false;
     _mIsPlaying    = false;
     _mTime         = DateTime.MinValue;
     _mCurrentFrame = 0;
     _mEffects.Clear();
 }
    /// <summary>
    /// Play the animation
    /// </summary>
    public override void Play()
    {
        //Debug.Log("Play");

        if (!_mIsLoaded)
        {
            Load();
            //Debug.LogError("Play Animation has not been loaded!");
            //return;
        }

        // clear on play to avoid unsetting on a loop
        _mOnComplete = null;

        _mTime         = DateTime.Now; //Time when animation started
        _mIsPlaying    = true;
        _mCurrentFrame = 0;

        if (_mCurrentFrame < _mEffects.Count)
        {
            if (!_mIsPaused &&
                ChromaConnectionManager.Instance.Connected)
            {
                //Debug.Log("SetEffect.");
                EffectResponseId effect = _mEffects[_mCurrentFrame];
                if (null != effect)
                {
                    ChromaUtils.SetEffect(effect.Id);
                }

                /*
                 * //Silently fail
                 * if (null != effect)
                 * {
                 *  EffectIdentifierResponse result = ChromaUtils.SetEffect(effect.Id);
                 *  if (null == result ||
                 *      result.Result != 0)
                 *  {
                 *      Debug.LogError("Failed to set effect!");
                 *  }
                 * }
                 * else
                 * {
                 *  Debug.LogError("Failed to set effect!");
                 * }
                 */
            }
        }
    }