Exemple #1
0
        public void PlayBackward()
        {
            LoopStyle oldStyle = loopStyle;

            loopStyle = LoopStyle.Backward;
            Play();
            loopStyle = oldStyle;
        }
Exemple #2
0
        public void PlayForward()
        {
            LoopStyle oldStyle = loopStyle;

            loopStyle = LoopStyle.Forward;
            Play();
            loopStyle = oldStyle;
        }
Exemple #3
0
        public static PlayMode GetPlayMode(ShuffleStyle shuffleStyle, LoopStyle loopStyle)
        {
#pragma warning disable CS8524
            return(shuffleStyle switch
#pragma warning restore CS8524
            {
                ShuffleStyle.NoShuffle => new NoShuffle(loopStyle),
                ShuffleStyle.Shuffle => new Shuffle(loopStyle)
            });
Exemple #4
0
        public Tweener(bool bIsPooled = true)
        {
            _LoopStyle = LoopStyle.Restart;

            _helper = new Helper();
            _helper.Init(this);

            if (bIsPooled)
            {
                _MarkType(TickableType.Pooled);
            }
        }
Exemple #5
0
        /// <summary>
        /// Reset this instance.
        /// </summary>
        public void Reset()
        {
            easeType        = EaseType.linear;
            loopStyle       = LoopStyle.Once;
            delay           = 0f;
            duration        = 1f;
            ignoreTimeScale = true;
            tweenGroup      = 0;
            finishedEvent.RemoveAllListeners();

            mAmountPerDelta = 1000f;
            mDuration       = 0f;
            mStartTime      = -1f;
            mFactor         = 0f;
        }
Exemple #6
0
        /// <summary>
        /// Reset this instance.
        /// </summary>
        public void Reset()
        {
            enabled         = true;
            easeType        = EaseType.linear;
            loopStyle       = LoopStyle.Once;
            delay           = 0f;
            duration        = 1f;
            ignoreTimeScale = true;
            //eventRecevier = null;
            onFinished = null;

            mAmountPerDelta = 1000f;
            mDuration       = 0f;
            mStartTime      = -1f;
            mFactor         = 0f;
        }
Exemple #7
0
 public void DoLoop(LoopStyle loopStyle)
 {
     if (loopStyle == LoopStyle.Yoyo)
     {
         _tweener._EaseType   = TweenMgr.GetInvEaseType(_tweener._EaseType);
         _tweener._FromValue  = _tweener._FromValue + _tweener._DeltaValue;
         _tweener._DeltaValue = -_tweener._DeltaValue;
     }
     else if (loopStyle == LoopStyle.Restart)
     {
         _property.SetValue(_tweener._FromValue);
     }
     else if (loopStyle == LoopStyle.Incremental)
     {
         _tweener._FromValue = _tweener._FromValue + _tweener._DeltaValue;
     }
 }
Exemple #8
0
        public void _Reset()
        {
            _name = null;

            _onComplete = null;
            _onLoop     = null;

            _LoopCount = 0;
            _LoopStyle = LoopStyle.Restart;

            _StartTime  = 0;
            _Duration   = 0;
            _Amplitude  = 1;
            _PausedTime = 0;
            _EaseType   = EaseType.OutQuad;

            _userData = null;
            _property = null;
            _helper.Detach();

            _AutoKill = true;
        }
Exemple #9
0
 public LoopMode(LoopStyle loopStyle, int time)
 {
     this.Style = loopStyle;
     this.LoopTime = time;
     this.isLoopFinished = false;
 }
Exemple #10
0
 public NoShuffle(LoopStyle loopStyle) : base(loopStyle)
 {
 }
Exemple #11
0
 public Tweener <PropType, Helper> SetLoopStyle(LoopStyle newValue)
 {
     _LoopStyle = newValue; return(this);
 }