Ejemplo n.º 1
0
        // -------------------------------------------------------------------------
        // Expert features
        // -------------------------------------------------------------------------

        /**
         * <b>Advanced use.</b>
         * <br/>Rebuilds a tween from the current one. May be used if you want to
         * build your own pool system. You should call __reset() before.
         */

        public void __build(ITweenable target, PositionType tweenType, int durationMillis, TweenEquation equation)
        {
            Reset();

            _isInitialized = true;

            _target         = target;
            _tweenType      = tweenType;
            _durationMillis = durationMillis;
            _equation       = equation;

            if (target != null)
            {
                _combinedTweenCount = target.GetTweenValues(tweenType, _localTmp);
                if ((_combinedTweenCount < 1) || (_combinedTweenCount > MaxCombinedTweens))
                {
                    throw new Exception("Min combined tweens = 1, max = " + MaxCombinedTweens);
                }
            }
        }