Ejemplo n.º 1
0
        public void FlipLeft()
        {
            if (mAnimatingStatus > 0)
            {
                return;
            }

            mSelectIndex     = (mSelectIndex + 1 + Count) % Count;
            mAnimatingStatus = AnimatingStatus.Left;
            for (int i = VisualChildCount - 1; i > 0; i--)
            {
                var lastItem = mItems[i - 1];
                mItems[i].Flip(lastItem.CurrentPosition, lastItem.CurrentScale, lastItem.CurrentOpacity);
            }
        }
Ejemplo n.º 2
0
        public void FlipRight()
        {
            if (mAnimatingStatus > 0)
            {
                return;
            }

            mSelectIndex     = (mSelectIndex - 1 + Count) % Count;
            mAnimatingStatus = AnimatingStatus.Right;
            for (int i = 0; i < VisualChildCount - 1; i++)
            {
                var nextItem = mItems[i + 1];
                mItems[i].Flip(nextItem.CurrentPosition, nextItem.CurrentScale, nextItem.CurrentOpacity);
            }
        }
Ejemplo n.º 3
0
        public void Update(double delta)
        {
            if (mAnimatingStatus == AnimatingStatus.None)
            {
                return;
            }

            for (int i = 0; i < mItems.Length; i++)
            {
                mItems[i].Update(mTimer);
            }
            mTimer += delta;
            if (mTimer >= ANIMATION_DURATION)
            {
                mAnimatingStatus = AnimatingStatus.None;
                mTimer           = 0;
                RefreshItems();
            }
        }