Пример #1
0
 public EaseVal(float initVal, EaseEq eq = null)
 {
     Init(initVal);
     if (eq != null)
     {
         this.eq     = eq;
         isRecursive = eq.Method.Name.IndexOf("ecursive") != -1;
     }
 }
Пример #2
0
 public void SetEaseEquation(EaseEq eq)
 {
     if (eq == null)
     {
         this.eq     = EaseFunc.QuadInOut;
         isRecursive = false;
     }
     else
     {
         this.eq     = eq;
         isRecursive = eq.Method.Name.IndexOf("ecursive") != -1;
     }
 }
Пример #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="val"></param>
        /// <param name="frameTaking"></param>
        /// <param name="eq"></param>
        public void To(float val, float frameTaking, EaseEq eq = null)
        {
            if (frameTaking < 0f)                       //if frame taking is 0, use set instead
            {
                Init(val);
                return;
            }
            else if (frameTaking == 0f)                         //if frame taking is 0, use set instead
            {
                Set(val);
                return;
            }                                     // else if( frame_taking == undefined ) { frame_taking = 0.0005f; }
            if (ef == 0.001f && sf == 0.0009999f) // havn't step set yet
            {
                s = e;
                c = s;
            }
            if (eq != null)
            {
                this.eq     = eq;
                isRecursive = eq.Method.Name.IndexOf("ecursive") != -1;
            }
            s = c;

            e = val;
            if (c == val)
            {
                ef = 0.001f;
                sf = 0.0009999f;
            }
            else
            {
                sf = 0f;
                ef = frameTaking;
            }
            if (frameTaking < 0.0005f)
            {
                pause = -999f;
                //EaseFunc.mEaseVals.Add( this );
            }
        }
Пример #4
0
 public void FromTo(float from, float to, float frameTaking, EaseEq eq = null)
 {
     Set(from);
     To(to, frameTaking, eq);
 }