protected override void OnUpdate()
 {
     if (base.mState == ListState.Waiting && isShown && mKeyController != null)
     {
         if (mKeyController.IsSankakuDown())
         {
             mUIShipSortButton.OnClickSortButton();
         }
         else if (mKeyController.IsDownDown())
         {
             NextFocus();
         }
         else if (mKeyController.IsUpDown())
         {
             PrevFocus();
         }
         else if (mKeyController.IsLeftDown())
         {
             PrevPageOrHeadFocus();
         }
         else if (mKeyController.IsRightDown())
         {
             NextPageOrTailFocus();
         }
         else if (mKeyController.IsMaruDown())
         {
             Select();
         }
     }
 }
Пример #2
0
 private void Update()
 {
     if (key != null)
     {
         key.Update();
         if (key.IsMaruDown() || key.IsBatuDown() || key.IsShikakuDown() || key.IsSankakuDown())
         {
             NextPage();
         }
     }
 }
 protected void Update()
 {
     if (!controllable || keyController == null)
     {
         return;
     }
     if ((keyController.keyState[12].holdTime > 1.5f || keyController.keyState[8].holdTime > 1.5f) && keyController.KeyInputInterval == defaultIntervalTime)
     {
         keyController.KeyInputInterval /= 3f;
     }
     else
     {
         keyController.KeyInputInterval = defaultIntervalTime;
     }
     if (keyController.IsUpDown())
     {
         if (!swipeBounceBackAnimating)
         {
             MovePrev();
         }
     }
     else if (keyController.IsDownDown())
     {
         if (!swipeBounceBackAnimating)
         {
             MoveNext();
         }
     }
     else if (keyController.IsMaruDown())
     {
         if ((UnityEngine.Object) this.currentChild != (UnityEngine.Object)null)
         {
             View currentChild = this.currentChild;
             currentChild.OnClick();
         }
     }
     else if (keyController.IsBatuDown())
     {
         handler.OnCancel();
         BounceBack();
         View viewByModelIndex = GetViewByModelIndex(rollCount);
         viewByModelIndex.DoSelect();
     }
     else if (keyController.IsSankakuDown())
     {
         OnPressSankaku();
     }
 }
Пример #4
0
 private void TopModeRun()
 {
     if (key.IsChangeIndex)
     {
         if (key.prevIndex == 4 && key.IsDownDown())
         {
             key.Index = 4;
             return;
         }
         if (key.prevIndex == 1 && key.IsUpDown())
         {
             key.Index = 1;
             return;
         }
         BannerFocusAnim(isEnable: false);
         FocusBanner = ShipStates[key.Index];
         BannerFocusAnim(isEnable: true);
         SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove, null);
     }
     else if (key.IsMaruDown())
     {
         GotoOrganize();
         SoundUtils.PlaySE(SEFIleInfos.CommonEnter1, null);
     }
     else if (key.IsShikakuDown())
     {
         GotoSupplyConfirm();
     }
     else if (key.IsSankakuDown() && FocusBanner.ShipModel != null)
     {
         GotoRepairConfirm();
     }
     else if (key.IsBatuDown())
     {
         BackToSailSelect();
     }
     else if (key.IsRSRightDown())
     {
         ChangeDeck(isNext: true);
     }
     else if (key.IsRSLeftDown())
     {
         ChangeDeck(isNext: false);
     }
 }
Пример #5
0
        private void Update()
        {
            if (key == null)
            {
                return;
            }
            float axisRaw  = Input.GetAxisRaw("Left Stick Horizontal");
            float axisRaw2 = Input.GetAxisRaw("Left Stick Vertical");

            if (key.keyState[16].press || key.keyState[23].press || key.keyState[17].press)
            {
                MenuCamera.orthographicSize     -= 0.3f * Time.deltaTime;
                InteriorCamera.orthographicSize -= 0.3f * Time.deltaTime;
            }
            else if (key.keyState[20].press || key.keyState[21].press || key.keyState[19].press)
            {
                MenuCamera.orthographicSize     += 0.3f * Time.deltaTime;
                InteriorCamera.orthographicSize += 0.3f * Time.deltaTime;
            }
            else if (key.IsRDown())
            {
                SingletonMonoBehaviour <PortObjectManager> .Instance.BackToStrategy();
            }
            else
            {
                if (key.IsSankakuDown())
                {
                    key.ClearKeyAll();
                    key.firstUpdate = true;
                    ExitMode();
                    return;
                }
                if (axisRaw == 0f && axisRaw2 == 0f)
                {
                    if (key.keyState[10].press)
                    {
                        character.transform.AddLocalPositionX(250f * Time.deltaTime);
                        Vector3 localPosition = character.transform.localPosition;
                        if (localPosition.x > 400f)
                        {
                            character.transform.localPositionX(400f);
                        }
                    }
                    else if (key.keyState[14].press)
                    {
                        character.transform.AddLocalPositionX(-250f * Time.deltaTime);
                        Vector3 localPosition2 = character.transform.localPosition;
                        if (localPosition2.x < -400f)
                        {
                            character.transform.localPositionX(-400f);
                        }
                    }
                }
            }
            if (key.keyState[8].press)
            {
                float   num        = -0.1f * Time.deltaTime;
                Vector3 localScale = character.transform.localScale;
                if (localScale.x + num > 1.1f)
                {
                    character.transform.AddLocalScale(num, num, num);
                    character.transform.AddLocalPositionY((float)character.render.height * (0f - num) / 4f);
                }
            }
            else if (key.keyState[12].press)
            {
                float   num2        = 0.1f * Time.deltaTime;
                float   num3        = 0.5f * (float)character.shipModel.Lov / 1000f;
                Vector3 localScale2 = character.transform.localScale;
                if (localScale2.x + num2 < 1.1f + num3)
                {
                    character.transform.AddLocalScale(num2, num2, num2);
                    character.transform.AddLocalPositionY((float)character.render.height * (0f - num2) / 4f);
                }
            }
            MenuCamera.transform.AddPosX(axisRaw * Time.deltaTime);
            MenuCamera.transform.AddPosY((0f - axisRaw2) * Time.deltaTime);
            InteriorCamera.transform.AddPosX(axisRaw * Time.deltaTime);
            InteriorCamera.transform.AddPosY((0f - axisRaw2) * Time.deltaTime);
            FixSize(MenuCamera);
            FixSize(InteriorCamera);
            FixPosition(MenuCamera);
            FixPosition(InteriorCamera);
        }