Exemple #1
0
 private void CalcDuration <T>(Reset <T> reset)
 {
     if (reset.resetType == ResetType.Yoyo)
     {
         duration /= 2;
     }
 }
Exemple #2
0
        private void Handle <T>(ref string type, FromToValue <T> fromToValue, Reset <T> reset,
                                Action callback, Func <Tweener> func)
        {
            if (!propertyType.Equals(type))
            {
                return;
            }


            tween = func();

            Loop(reset, callback);
            AddIsFrom(fromToValue);
        }
Exemple #3
0
        private void Loop <T>(Reset <T> reset, Action resetCallback)
        {
            switch (reset.resetType)
            {
            case ResetType.Yoyo:
                tween.SetLoops(reset.loop ? -1 : 2, LoopType.Yoyo);
                break;

            case ResetType.ToValue:
                tween.SetLoops(reset.loop ? -1 : 1, LoopType.Restart);
                tween.onComplete += () => resetCallback();
                break;
            }
        }