Ejemplo n.º 1
0
        private void VisibleState(AnimState lastState, ref TweenHolder returnTween)
        {
            Vector3 finalPosition = _parentModViewtroller.ParentCardHolder.GetFinalPositionOfCard(_parentModViewtroller);

            switch (lastState)
            {
            case AnimState.SELECTED:
                returnTween.AddIncrementalScaleTween(Vector3.one);
                goto case AnimState.ABLE_TO_BE_SELECTED;

            case AnimState.ABLE_TO_BE_SELECTED:
                returnTween.RemoveTweenOfType <PositionPingPongTween>().AddIncrementalPositionTween(finalPosition);
                break;

            default:                     // case AnimState.OBSCURED:
                if (returnTween.GetTweenOfType <PositionPingPongTween>() != null)
                {
                    goto case AnimState.ABLE_TO_BE_SELECTED;
                }
                returnTween.AddPositionPingPongTween(finalPosition
                                                     + Vector3.up * _parentModViewtroller._cardAnimationData.CardFloatingHeight, finalPosition)
                .AddLocalRotationTween(Vector3.zero);
                break;
            }
            returnTween.SetDuration(_parentModViewtroller._cardAnimationData.CardStateChangeDuration);
        }
Ejemplo n.º 2
0
        private void AbleToBeSelectedState(AnimState lastState, ref TweenHolder returnTween)
        {
            switch (lastState)
            {
            case AnimState.SELECTED:
                returnTween.AddIncrementalScaleTween(Vector3.one);
                goto default;

            case AnimState.OBSCURED:
                returnTween.AddLocalRotationTween(Vector3.zero);
                goto default;

            default:                     // case AnimState.VISIBLE:
                returnTween.AddIncrementalPositionTween(_parentModViewtroller.ParentCardHolder.GetFinalPositionOfCard(_parentModViewtroller));
                break;
            }
            returnTween.SetDuration(_parentModViewtroller._cardAnimationData.CardStateChangeDuration);
        }