public static CameraParameter Get(float value, float duration, Ease.eEaseType ease)
        {
            CameraParameter ins = cached_instances.Count > 0 ? cached_instances.Dequeue() : new CameraParameter();

            ins.value    = value;
            ins.duration = duration;
            ins.ease     = ease;
            ins.curve    = null;
            ins.isAngle  = false;
            return(ins);
        }
 public void ResetView(float duration, Ease.eEaseType ease)
 {
     if (mViewInited)
     {
         AnimProperty(mRotY, CameraParameter.Get(DefaultRotY, duration, ease), true);
         AnimProperty(mLookDown, CameraParameter.Get(DefaultLookDown, duration, ease), true);
         mDistance.AnimTo(DefaultDistance, duration, ease);
         mCamFovOrSize.AnimTo(DefaultCamFovOrSize, duration, ease);
         mPropTweening = true;
     }
     else
     {
         mViewInited         = true;
         mRotY.Value         = DefaultRotY;
         mLookDown.Value     = DefaultLookDown;
         mDistance.Value     = DefaultDistance;
         mCamFovOrSize.Value = DefaultCamFovOrSize;
         FlushCamera();
     }
 }
        protected void PlayTweener <S, O, T, P>(TweenData tween, O target, T value)
            where P : PropTween <T>, new() where O : class where S : TweenerBase <O, T, P>, new()
        {
            int index   = (int)tween.tweenType;
            S   tweener = mTweeners[index] as S;

            if (tweener == null)
            {
                tweener = Tweener.GetTweener <S, O>(target);
                Tweener.CacheTweener(mTweeners[index]);
                mTweeners[index] = tweener;
            }
            tweener.Loop              = tween.loop;
            tweener.LoopInterval      = tween.loopInterval;
            tweener.IntervalKeepAtEnd = tween.intervalKeepAtEnd;
            AnimationCurve curve    = tween.curve;
            float          duration = tween.duration;

            Ease.eEaseType ease = tween.ease;
            switch (tween.easeDefinition)
            {
            case eEaseDefinition.Curve:
                if (curve != null && curve.length < 2)
                {
                    curve = null;
                }
                ease = Ease.eEaseType.Linear;
                break;

            case eEaseDefinition.CurveWithDuration:
                if (curve != null && curve.length >= 2)
                {
                    duration = -1f;
                }
                else
                {
                    curve = null;
                }
                ease = Ease.eEaseType.Linear;
                break;

            default:
                curve = null;
                break;
            }
            if (curve != null)
            {
                if (tween.unscaled)
                {
                    tweener.UnscaledDelayTo(value, tween.delay, duration, curve);
                }
                else
                {
                    tweener.DelayTo(value, tween.delay, duration, curve);
                }
            }
            else
            {
                if (tween.unscaled)
                {
                    tweener.UnscaledDelayTo(value, tween.delay, duration, ease);
                }
                else
                {
                    tweener.DelayTo(value, tween.delay, duration, ease);
                }
            }
        }
 public void ChangeFollowTarget(Transform target, Vector3 offset, float duration, Ease.eEaseType ease)
 {
     if (!mTargetInited)
     {
         SetFollowTarget(target, offset);
         return;
     }
     FollowTarget             = target;
     mTweenTargetOffset.Value = offset;
     mPrevPos = target != null ? target.position + offset : offset;
     mTargetPos.AnimTo(mPrevPos, duration, ease);
     mPropTweening = true;
 }
 public void ChangeOffset(Vector3 offset, float duration, Ease.eEaseType ease)
 {
     mTweenTargetOffset.AnimTo(offset, duration, ease);
 }