Exemplo n.º 1
0
 internal virtual void Reset()
 {
     this.timeScale           = 1f;
     this.isBackwards         = false;
     this.id                  = null;
     this.isIndependentUpdate = false;
     base.onStart             = this.onPlay = this.onRewind = this.onUpdate = this.onComplete = this.onStepComplete = (TweenCallback)(this.onKill = null);
     this.onWaypointChange    = null;
     this.target              = null;
     this.isFrom              = false;
     this.isBlendable         = false;
     this.isSpeedBased        = false;
     this.duration            = 0f;
     this.loops               = 1;
     this.delay               = 0f;
     this.isRelative          = false;
     this.customEase          = null;
     this.isSequenced         = false;
     this.sequenceParent      = null;
     this.specialStartupMode  = SpecialStartupMode.None;
     this.creationLocked      = this.startupDone = this.playedOnce = false;
     this.position            = this.fullDuration = this.completedLoops = 0;
     this.isPlaying           = this.isComplete = false;
     this.elapsedDelay        = 0f;
     this.delayComplete       = true;
     this.miscInt             = -1;
 }
Exemplo n.º 2
0
        internal bool delayComplete = true; // TRUE when the delay has elapsed or isn't set, also set by Delay extension method (shared by Sequences only for compatibility reasons, otherwise not used)

        #region Abstracts + Overrideables

        // Doesn't reset active state, activeId and despawned, since those are only touched by TweenManager
        // Doesn't reset default values since those are set when Tweener.Setup is called
        internal virtual void Reset()
        {
            timeScale           = 1;
            isBackwards         = false;
            id                  = null;
            updateType          = UpdateType.Default;
            isIndependentUpdate = false;
            onStart             = onPlay = onRewind = onUpdate = onComplete = onStepComplete = onKill = null;

            target             = null;
            isFrom             = false;
            isSpeedBased       = false;
            duration           = 0;
            loops              = 1;
            delay              = 0;
            isRelative         = false;
            customEase         = null;
            isSequenced        = false;
            sequenceParent     = null;
            specialStartupMode = SpecialStartupMode.None;
            creationLocked     = startupDone = playedOnce = false;
            position           = fullDuration = completedLoops = 0;
            isPlaying          = isComplete = false;
            elapsedDelay       = 0;
            delayComplete      = true;

            // The following are set during a tween's Setup
//            isRecyclable = DOTween.defaultRecyclable;
//            autoKill = DOTween.defaultAutoKill;
//            loopType = DOTween.defaultLoopType;
//            easeType = DOTween.defaultEaseType;
//            easeOvershootOrAmplitude = DOTween.defaultEaseOvershootOrAmplitude;
//            easePeriod = DOTween.defaultEasePeriod
        }
Exemplo n.º 3
0
        internal int miscInt = -1;          // Used by some plugins to store data (currently only by Paths to store current waypoint index)

        #region Abstracts + Overrideables

        // Doesn't reset active state, activeId and despawned, since those are only touched by TweenManager
        // Doesn't reset default values since those are set when Tweener.Setup is called
        internal virtual void Reset()
        {
            timeScale           = 1;
            isBackwards         = false;
            id                  = null;
            stringId            = null;
            intId               = -999;
            isIndependentUpdate = false;
            onStart             = onPlay = onRewind = onUpdate = onComplete = onStepComplete = onKill = null;
            onWaypointChange    = null;

            debugTargetId = null;

            target             = null;
            isFrom             = false;
            isBlendable        = false;
            isSpeedBased       = false;
            duration           = 0;
            loops              = 1;
            delay              = 0;
            isRelative         = false;
            customEase         = null;
            isSequenced        = false;
            sequenceParent     = null;
            specialStartupMode = SpecialStartupMode.None;
            creationLocked     = startupDone = playedOnce = false;
            position           = fullDuration = completedLoops = 0;
            isPlaying          = isComplete = false;
            elapsedDelay       = 0;
            delayComplete      = true;

            miscInt = -1;

            // The following are set during a tween's Setup
//            isRecyclable = DOTween.defaultRecyclable;
//            autoKill = DOTween.defaultAutoKill;
//            loopType = DOTween.defaultLoopType;
//            easeType = DOTween.defaultEaseType;
//            easeOvershootOrAmplitude = DOTween.defaultEaseOvershootOrAmplitude;
//            easePeriod = DOTween.defaultEasePeriod

            // The following are set during TweenManager.AddActiveTween
            // (so the previous updateType is still stored while removing tweens)
//            updateType = UpdateType.Normal;
        }
Exemplo n.º 4
0
 internal static T SetSpecialStartupMode <T>(this T t, SpecialStartupMode mode) where T : Tween
 {
     ((Tween)(object)t).specialStartupMode = mode;
     return(t);
 }
Exemplo n.º 5
0
 /// <summary>
 /// INTERNAL: used by DO shortcuts and Modules to set special startup mode
 /// </summary>
 public static T SetSpecialStartupMode <T>(this T t, SpecialStartupMode mode) where T : Tween
 {
     t.specialStartupMode = mode;
     return(t);
 }