Exemplo n.º 1
0
 public void Start(float start, float end, float speed, MCEaseType easeType = MCEaseType.Linear)
 {
     this.startValue = start;
     this.endValue   = end;
     this.speed      = speed;
     this.easeType   = easeType;
     timer           = 0;
     isStarted       = true;
 }
Exemplo n.º 2
0
 public virtual void StartAnim(MCFloatAnimData data)
 {
     m_Data = data;
     if (data.overwriteEasing != null)
     {
         m_EaseType = data.overwriteEasing.type;
     }
     m_CachedFunction = easeFunction;
     m_Timer          = 0.0f;
     m_Data.ResetTimedActions();
     m_Started = true;
 }
Exemplo n.º 3
0
        public static EasingFunction Get(MCEaseType type)
        {
            switch (type)
            {
            case MCEaseType.Linear:
                return(Linear);

            case MCEaseType.EaseInQuad:
                return(EaseInQuad);

            case MCEaseType.EaseOutQuad:
                return(EaseOutQuad);

            case MCEaseType.EaseInOutQuad:
                return(EaseInOutQuad);

            case MCEaseType.EaseInCubic:
                return(EaseInCubic);

            case MCEaseType.EaseOutCubic:
                return(EaseOutCubic);

            case MCEaseType.EaseInOutCubic:
                return(EaseInOutCubic);

            case MCEaseType.EaseInQuart:
                return(EaseInQuart);

            case MCEaseType.EaseOutQuart:
                return(EaseOutQuart);

            case MCEaseType.EaseInOutQuart:
                return(EaseInOutQuart);

            case MCEaseType.EaseInQuint:
                return(EaseInQuint);

            case MCEaseType.EaseOutQuint:
                return(EaseOutQuint);

            case MCEaseType.EaseInOutQuint:
                return(EaseInOutQuint);

            case MCEaseType.EaseInSine:
                return(EaseInSine);

            case MCEaseType.EaseOutSine:
                return(EaseOutSine);

            case MCEaseType.EaseInOutSine:
                return(EaseInOutSine);

            case MCEaseType.EaseInExpo:
                return(EaseInExpo);

            case MCEaseType.EaseOutExpo:
                return(EaseOutExpo);

            case MCEaseType.EaseInOutExpo:
                return(EaseInOutExpo);

            case MCEaseType.EaseInCirc:
                return(EaseInCirc);

            case MCEaseType.EaseOutCirc:
                return(EaseOutCirc);

            case MCEaseType.EaseInOutCirc:
                return(EaseInOutCirc);

            default:
                return(Linear);
            }
        }