Esempio n. 1
0
 public void Initialize(int position, ShipModel shipModel)
 {
     mLabel_ShipPosition.text = position.ToString();
     mCommonShipBanner.SetShipData(shipModel);
     if (mCommonShipSupplyState != null)
     {
         mCommonShipSupplyState.setSupplyState(shipModel);
     }
 }
 public void SetShipData(ShipModel model, int nIndex)
 {
     base.SetShipData(model);
     if (model == null)
     {
         _uiStarManager.SetStar(0);
         if (_bunnerShutter != null)
         {
             _bunnerShutter.SetActive(isActive: true);
             if (_shipState != null)
             {
                 UISelectedObject.SelectedOneObjectBlink(_uiBackground.gameObject, value: false);
                 _shipState.SetActive(false);
             }
         }
         else
         {
             base.transform.localScaleZero();
         }
         return;
     }
     if (_shipState != null)
     {
         _shipState.SetActive(true);
     }
     base.transform.localScaleOne();
     if (_bunnerShutter != null)
     {
         _bunnerShutter.SetFocusLight(isEnable: false);
         _bunnerShutter.SetActive(isActive: false);
     }
     _uiIndex.textInt  = nIndex;
     _uiHpSlider.value = Mathe.Rate(0f, model.MaxHp, model.NowHp);
     _uiHpSlider.foregroundWidget.color = Util.HpLabelColor(model.MaxHp, model.NowHp);
     _uiLv.textInt = model.Level;
     _uiName.text  = model.Name;
     _uiSupplyState.setSupplyState(model);
     _uiSupplyState.SetActive(_uiSupplyState.isEitherSupplyNeeds);
     _uiStarManager.SetStar(model.Srate);
 }