private void _CheckBuildDockState()
        {
            bool flag = false;

            for (int i = 0; i < this._docks.get_Count(); i++)
            {
                BuildDockModel buildDockModel = this._docks.get_Item(i);
                if (buildDockModel.State == KdockStates.CREATE && buildDockModel.GetTurn() == 0)
                {
                    flag = true;
                    break;
                }
            }
            if (flag)
            {
                this._UpdateBuildDockData();
            }
        }
Beispiel #2
0
        private void _CheckBuildDockState()
        {
            bool flag = false;

            for (int i = 0; i < _docks.Count; i++)
            {
                BuildDockModel buildDockModel = _docks[i];
                if (buildDockModel.State == KdockStates.CREATE && buildDockModel.GetTurn() == 0)
                {
                    flag = true;
                    break;
                }
            }
            if (flag)
            {
                _UpdateBuildDockData();
            }
        }
 public void set(ShipModelMst ship, BuildDockModel dock, bool isHight)
 {
     _ship          = ship;
     _dock          = dock;
     _fullCount     = _dock.CompleteTurn - _dock.StartTurn;
     _nowBuildCount = _fullCount - _dock.GetTurn();
     if (_dock.State == KdockStates.COMPLETE)
     {
         if (isHight)
         {
             SetFirstShip();
         }
         else
         {
             SetShipCmp();
         }
     }
     else
     {
         SetShip();
     }
 }
 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;
     }
 }