Exemplo n.º 1
0
        /// <summary>
        /// Given a time, returns the weight from the mix out
        /// </summary>
        /// <param name="time">Time (relative to the timeline)</param>
        /// <returns></returns>
        public float EvaluateMixOut(double time)
        {
            if (!clipCaps.HasAny(ClipCaps.Blending))
            {
                return(1.0f);
            }

            if (mixOutDuration > Mathf.Epsilon)
            {
                var perc = (float)(time - mixOutTime) / (float)mixOutDuration;
                perc = Mathf.Clamp01(mixOutCurve.Evaluate(perc));
                return(perc);
            }
            return(1.0f);
        }