public virtual AsDelayedCall reset(AsDelayedCallback call, float delay, AsArray args)
 {
     mCurrentTime = 0;
     mTotalTime   = AsMath.max(delay, 0.0001f);
     mCall        = call;
     mArgs        = args;
     mRepeatCount = 1;
     return(this);
 }
Exemple #2
0
 public virtual AsTween reset(Object target, float time, Object transition)
 {
     mTarget       = target;
     mCurrentTime  = 0;
     mTotalTime    = AsMath.max(0.0001f, time);
     mDelay        = mRepeatDelay = 0.0f;
     mOnStart      = mOnUpdate = mOnComplete = null;
     mOnStartArgs  = mOnUpdateArgs = mOnCompleteArgs = null;
     mRoundToInt   = mReverse = false;
     mRepeatCount  = 1;
     mCurrentCycle = -1;
     if (transition is String)
     {
         this.setTransition(transition as String);
     }
     else
     {
         if (transition is AsTransitionCallback)
         {
             this.setTransitionFunc(transition as AsTransitionCallback);
         }
         else
         {
             throw new AsArgumentError("Transition must be either a string or a function");
         }
     }
     if (mProperties != null)
     {
         mProperties.setLength(0);
     }
     else
     {
         mProperties = new AsVector <String>();
     }
     if (mStartValues != null)
     {
         mStartValues.setLength(0);
     }
     else
     {
         mStartValues = new AsVector <float>();
     }
     if (mEndValues != null)
     {
         mEndValues.setLength(0);
     }
     else
     {
         mEndValues = new AsVector <float>();
     }
     return(this);
 }