private void OnSwipeAction(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movedPercentageX, float movedPercentageY, float elapsedTime)
        {
            if (controllable && !swipeBounceBackAnimating)
            {
                float num         = deltaY;
                float childHeight = GetChildHeight();
                if (childHeight < num)
                {
                    num = childHeight;
                }
                else if (num < 0f - childHeight)
                {
                    num = 0f - childHeight;
                }
                switch (actionType)
                {
                case UIDisplaySwipeEventRegion.ActionType.Moving:
                    cursorIndex = 0;
                    RefreshPosition(num);
                    break;

                case UIDisplaySwipeEventRegion.ActionType.FingerUp:
                {
                    BounceBack();
                    View viewByModelIndex = GetViewByModelIndex(rollCount);
                    viewByModelIndex.DoSelect();
                    break;
                }
                }
            }
        }
 private void OnSwipeEventAction(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movedPercentageX, float movedPercentageY, float elapsedTime)
 {
     if (this.mSwipeActionJudgeCallBack != null)
     {
         this.mSwipeActionJudgeCallBack(actionType, deltaX, deltaY, movedPercentageX, movedPercentageY, elapsedTime);
     }
 }
 private void OnSwipe(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movedPercentageX, float movedPercentageY, float elapsedTime)
 {
     if (this.mOnSwipeListener != null)
     {
         this.mOnSwipeListener(actionType, deltaX, deltaY, movedPercentageX, movedPercentageY, elapsedTime);
     }
 }
Exemplo n.º 4
0
 private void OnSwipeEvent(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movedPercentageX, float movedPercentageY, float elapsedTime)
 {
     if (actionType == UIDisplaySwipeEventRegion.ActionType.FingerUp)
     {
         if (0.3f < movedPercentageX)
         {
             FlickLeftSweet();
         }
         else if (movedPercentageX < -0.3f)
         {
             FlickRightSweet();
         }
     }
 }
Exemplo n.º 5
0
 private void OnSwipe(UIDisplaySwipeEventRegion.ActionType iType, float dX, float dY, float mpX, float mpY, float et)
 {
     if (!_isMove && iType == UIDisplaySwipeEventRegion.ActionType.Moving)
     {
         if (mpX >= 0.15f)
         {
             PreparaNext(isFoward: true);
         }
         else if (mpX <= -0.15f)
         {
             PreparaNext(isFoward: false);
         }
     }
 }
 private void SwipeJudgeDelegate(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movePercentageX, float movePercentageY, float elapsedTime)
 {
     if (mKeyController != null && actionType == UIDisplaySwipeEventRegion.ActionType.FingerUp)
     {
         if (0.3f < movePercentageX)
         {
             PrevPage();
         }
         else if (movePercentageX < -0.3f)
         {
             NextPage();
         }
     }
 }
Exemplo n.º 7
0
 private void OnSwipeEvent(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movedPercentageX, float movedPercentageY, float elapsedTime)
 {
     if (actionType == UIDisplaySwipeEventRegion.ActionType.FingerUp)
     {
         float num = 0.2f;
         if (num < Math.Abs(movedPercentageX))
         {
             if (0f < movedPercentageX)
             {
                 this.mUIBattleFormationKindSelector.Prev();
             }
             else
             {
                 this.mUIBattleFormationKindSelector.Next();
             }
         }
     }
 }
 private void OnSwipe(UIDisplaySwipeEventRegion.ActionType iType, float dX, float dY, float mpX, float mpY, float et)
 {
     if (this._isMove)
     {
         return;
     }
     if (iType == UIDisplaySwipeEventRegion.ActionType.Moving)
     {
         if (mpX >= 0.15f)
         {
             this.PreparaNext(true);
         }
         else if (mpX <= -0.15f)
         {
             this.PreparaNext(false);
         }
     }
 }
 private void OnSwipeAction(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movedPercentageX, float movedPercentageY, float elapsedTime)
 {
     if (actionType == UIDisplaySwipeEventRegion.ActionType.FingerUp && !mStageConfirm.Shown)
     {
         if (40f < deltaX)
         {
             mRouletteSelector.MovePrev();
             movedPercentageX = 0f;
         }
         else if (deltaX < -40f)
         {
             mRouletteSelector.MoveNext();
             movedPercentageX = 0f;
         }
         else if (!(deltaY < -40f))
         {
         }
     }
 }
Exemplo n.º 10
0
        private void OnSwipeEventListener(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movePercentageX, float movePercentageY, float elapsedTime)
        {
            if (mKeyController == null || actionType != UIDisplaySwipeEventRegion.ActionType.FingerUp)
            {
                return;
            }
            float num = 0.1f;

            if (num < Math.Abs(movePercentageX))
            {
                if (0f < movePercentageX)
                {
                    MoveToLeftPage();
                }
                else if (movePercentageX < 0f)
                {
                    MoveToRightPage();
                }
            }
        }
Exemplo n.º 11
0
 private void SwipeJudgeDelegate(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movedPercentageX, float movedPercentageY, float elapsedTime)
 {
     if (!needAnimation)
     {
         if (actionType == UIDisplaySwipeEventRegion.ActionType.Moving && movedPercentageY >= 0.2f && !_isTouch)
         {
             _isTouch = true;
             Pressed_Button_L(null);
         }
         else if (actionType == UIDisplaySwipeEventRegion.ActionType.Moving && movedPercentageY <= -0.2f && !_isTouch)
         {
             _isTouch = true;
             Pressed_Button_R(null);
         }
         else if (actionType == UIDisplaySwipeEventRegion.ActionType.FingerUp)
         {
             _isTouch = false;
         }
     }
 }
Exemplo n.º 12
0
        private void OnSwipeDeckListener(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movePercentageX, float movePercentageY, float elapsedTime)
        {
            if (actionType != UIDisplaySwipeEventRegion.ActionType.FingerUp || (status != 0 && status != ScreenStatus.SELECT_OTHER_SHIP))
            {
                return;
            }
            float num = 0.1f;

            if (num < Math.Abs(movePercentageX))
            {
                if (0f < movePercentageX)
                {
                    commonDeckSwitchManager.ChangePrevDeck();
                }
                else
                {
                    commonDeckSwitchManager.ChangeNextDeck();
                }
            }
        }
Exemplo n.º 13
0
        private void UIDisplaySwipeEventRegionDelegate(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movedPercentageX, float movedPercentageY, float elapsedTime)
        {
            if (AnimationViewPositionNow || AnimationScrollNow || !EnableTouchControl)
            {
                return;
            }
            float childHeight = GetChildHeight();

            if (childHeight < Math.Abs(deltaY))
            {
                if (0.3f < deltaY)
                {
                    deltaY = childHeight;
                }
                else if (deltaY < -0.3f)
                {
                    deltaY = 0f - childHeight;
                }
            }
            switch (actionType)
            {
            case UIDisplaySwipeEventRegion.ActionType.Start:
                break;

            case UIDisplaySwipeEventRegion.ActionType.Moving:
                CursolIndex = 0;
                RefreshPosition(deltaX, deltaY);
                break;

            case UIDisplaySwipeEventRegion.ActionType.FingerUp:
            {
                RelocationWithAnimation();
                int loopIndex = GetLoopIndex(RollCount, GetLogicViewingLength(), 0);
                if (loopIndex >= 0 && loopIndex < Views.Length)
                {
                    ChangeFocusView(Views[loopIndex], isFirstFocus: false);
                }
                break;
            }
            }
        }
Exemplo n.º 14
0
 private void CheckSwipe(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movedPercentageX, float movedPercentageY, float elapsedTime)
 {
     if (actionType == UIDisplaySwipeEventRegion.ActionType.FingerUp || SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsFocus)
     {
         swipeWait = false;
         prevMoveY = 0f;
         keyController.ClearKeyAll();
     }
     else if (!swipeWait)
     {
         if (movedPercentageY - prevMoveY > 0.15f && !SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsFocus)
         {
             IndexChange = -1;
             prevMoveY   = movedPercentageY;
         }
         else if (movedPercentageY - prevMoveY < -0.15f && !SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsFocus)
         {
             IndexChange = 1;
             prevMoveY   = movedPercentageY;
         }
     }
 }
Exemplo n.º 15
0
 private void SwipeJudgeDelegate(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movedPercentageX, float movedPercentageY, float elapsedTime)
 {
     if (this._isAnime)
     {
         this._isTouch = false;
         return;
     }
     if (actionType == UIDisplaySwipeEventRegion.ActionType.Moving && movedPercentageY >= 0.05f && !this._isTouch)
     {
         this._isTouch = true;
         this.Pressed_Button_L(null);
     }
     else if (actionType == UIDisplaySwipeEventRegion.ActionType.Moving && movedPercentageY <= -0.05f && !this._isTouch)
     {
         this._isTouch = true;
         this.Pressed_Button_R(null);
     }
     else if (actionType == UIDisplaySwipeEventRegion.ActionType.FingerUp)
     {
         this._isTouch = false;
     }
 }
Exemplo n.º 16
0
        private void OnSwipeListener(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movePercentageX, float movePercentageY, float elapsedTime)
        {
            if (actionType != UIDisplaySwipeEventRegion.ActionType.FingerUp)
            {
                return;
            }
            float num = 0.1f;

            if (!(num < Math.Abs(movePercentageX)))
            {
                return;
            }
            if (0f < movePercentageX)
            {
                if (_status == ScreenStatus.SHIP_SELECT)
                {
                    _commonDeckSwitchManager.ChangePrevDeck();
                }
            }
            else if (_status == ScreenStatus.SHIP_SELECT)
            {
                _commonDeckSwitchManager.ChangeNextDeck();
            }
        }
Exemplo n.º 17
0
        private void UIDisplaySwipeEventRegionDelegate(UIDisplaySwipeEventRegion.ActionType actionType, float deltaX, float deltaY, float movedPercentageX, float movedPercentageY, float elapsedTime)
        {
            if (!this.AnimationViewPositionNow && !this.AnimationScrollNow && this.EnableTouchControl)
            {
                float childHeight = this.GetChildHeight();
                if (childHeight < Math.Abs(deltaY))
                {
                    if (0.3f < deltaY)
                    {
                        deltaY = childHeight;
                    }
                    else if (deltaY < -0.3f)
                    {
                        deltaY = -childHeight;
                    }
                }
                switch (actionType)
                {
                case UIDisplaySwipeEventRegion.ActionType.Moving:
                    this.CursolIndex = 0;
                    this.RefreshPosition(deltaX, deltaY);
                    break;

                case UIDisplaySwipeEventRegion.ActionType.FingerUp:
                {
                    this.RelocationWithAnimation();
                    int loopIndex = this.GetLoopIndex(this.RollCount, this.GetLogicViewingLength(), 0);
                    if (loopIndex >= 0 && loopIndex < this.Views.Length)
                    {
                        this.ChangeFocusView(this.Views[loopIndex], false);
                    }
                    break;
                }
                }
            }
        }