コード例 #1
0
        private void SetFirstShip()
        {
            int num = 0;

            int[] array = new int[5];
            int   num2;
            int   num3;

            UISprite[] array2;
            if (_dock.IsTunker())
            {
                num2   = (int)Math.Ceiling((double)_fullCount / 5.0);
                num3   = 5;
                array2 = _ship3;
            }
            else
            {
                num2   = (int)Math.Ceiling((double)_fullCount / (double)_ship.BuildStep);
                num3   = _ship.BuildStep;
                array2 = _ship1;
            }
            if (num2 == 0)
            {
                num = _nowBuildCount;
                if (num <= num3)
                {
                }
            }
            else
            {
                for (int i = 0; i < 5; i++)
                {
                    array[i] = i * num2;
                }
                for (int j = 0; j < 5; j++)
                {
                    if (j != 0 && array[j] <= _nowBuildCount)
                    {
                        num++;
                    }
                    if (num > num3)
                    {
                        break;
                    }
                }
            }
            array2[0].transform.SetActive(isActive: true);
        }
コード例 #2
0
 public void GetShipBtnEL()
 {
     if (UICamera.touchCount > 1 || ArsenalTaskManager._clsArsenal.checkDialogOpen() || !TaskMainArsenalManager.IsControl || IsHight)
     {
         return;
     }
     setFocus();
     SoundUtils.PlaySE(SEFIleInfos.CommonEnter1);
     ArsenalTaskManager._clsArsenal.setTutorialVisible(isVisible: false);
     if (_dock.IsTunker())
     {
         if (TaskMainArsenalManager.arsenalManager.IsValidGetCreatedTanker(_number + 1))
         {
             int countNoMove   = TaskMainArsenalManager.arsenalManager.GetNonDeploymentTankerCount().GetCountNoMove();
             int createdTanker = TaskMainArsenalManager.arsenalManager.GetCreatedTanker(_number + 1);
             int afterNum      = countNoMove + createdTanker;
             _shipSManager.init(_number);
             _setShow();
             ArsenalTaskManager._clsArsenal.showTankerDialog(createdTanker, countNoMove, afterNum);
         }
     }
     else if (TaskMainArsenalManager.arsenalManager.IsValidGetCreatedShip(_number + 1))
     {
         IsHight     = false;
         _rewardShip = TaskMainArsenalManager.arsenalManager.GetCreatedShip(_number + 1);
         SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = false;
         TaskMainArsenalManager.IsControl     = false;
         TaskMainArsenalManager.isTouchEnable = false;
         Observable.FromCoroutine((IObserver <bool> observer) => createReciveShip(observer)).Subscribe(delegate
         {
             _prodReceiveShip.SetActive(isActive: true);
             _prodReceiveShip.Play(_onShipGetFinished);
         });
         this.DelayActionFrame(3, delegate
         {
             _shipSManager.init(_number);
             _setShow();
         });
     }
     else if (Comm_UserDatas.Instance.User_basic.IsMaxChara())
     {
         CommonPopupDialog.Instance.StartPopup(Util.getPopupMessage(PopupMess.CannotGetArsenalByLimitShip));
     }
     else if (Comm_UserDatas.Instance.User_basic.IsMaxSlotitem())
     {
         CommonPopupDialog.Instance.StartPopup(Util.getPopupMessage(PopupMess.CannotGetArsenalByLimitItem));
     }
 }
コード例 #3
0
 public void _setShow(bool DockOpen)
 {
     _dock = TaskMainArsenalManager.arsenalManager.GetDock(_number + 1);
     _close();
     if (dockMode == DockMode.Close)
     {
         dockMode = DockMode.Show;
     }
     _uiBg.alpha       = 1f;
     _uiBg2.alpha      = 1f;
     _uiBg.mainTexture = (Resources.Load("Textures/Arsenal/dock/kenzo_bg_1") as Texture2D);
     if (!DockOpen && dockMode != 0)
     {
         _lockObj.SetActive(false);
     }
     updateSpeedUpIcon();
     if (_dock.IsLarge())
     {
         _uiBg2.mainTexture = (Resources.Load("Textures/Arsenal/dock/kenzo_build2_bg") as Texture2D);
     }
     else if (_dock.IsTunker())
     {
         _uiBg2.mainTexture = (Resources.Load("Textures/Arsenal/dock/kenzo_build3_bg") as Texture2D);
     }
     else
     {
         _uiBg2.mainTexture = (Resources.Load("Textures/Arsenal/dock/kenzo_build1_bg") as Texture2D);
     }
     if (_dock.State == KdockStates.COMPLETE)
     {
         _ship = _dock.Ship;
         if (IsHight)
         {
             _shipSManager.set(_ship, _dock, isHight: true);
             _uiGetBtn.transform.localScale  = Vector3.zero;
             _uiHighBtn.transform.localScale = Vector3.one;
             _uiTurnLabel.alpha = 1f;
             _limit             = _dock.GetTurn();
             _uiTurnLabel.text  = string.Empty + _limit.ToString();
             if (IsFirstHight)
             {
                 PlayFirstHightAnimate();
             }
             else
             {
                 StartSpeedUpAnimate();
             }
         }
         else
         {
             _shipSManager.set(_ship, _dock, isHight: false);
             endConstruct();
             if (IsHightEnd)
             {
                 _dockMiniMamager.PlayEndHightAnimate();
             }
             else
             {
                 _dockMiniMamager.PlayConstCompAnimation();
             }
         }
     }
     else if (_dock.State == KdockStates.CREATE)
     {
         _ship = _dock.Ship;
         _shipSManager.set(_ship, _dock, isHight: false);
         _uiGetBtn.transform.localScale  = Vector3.zero;
         _uiHighBtn.transform.localScale = Vector3.one;
         _uiTurnLabel.alpha = 1f;
         _limit             = _dock.GetTurn();
         _uiTurnLabel.text  = string.Empty + _limit.ToString();
         _dockMiniMamager.PlayConstStartAnimation();
     }
     else
     {
         _dockMiniMamager.StopConstAnimation();
         _dockMiniMamager.PlayIdleAnimation();
         _uiStartBtn.transform.localScale = Vector3.one;
     }
 }