Exemplo n.º 1
0
        public void Init(ShipModel ship)
        {
            this.ship       = ship;
            labelName.text  = ship.Name;
            labelLevel.text = ship.Level.ToString();
            stars.init(ship.Srate);
            shipTypeMarkIcon.mainTexture = ResourceManager.LoadShipTypeIcon(ship);
            UIRemodelEquipSlotItem[] array = slots;
            foreach (UIRemodelEquipSlotItem uIRemodelEquipSlotItem in array)
            {
                uIRemodelEquipSlotItem.Hide();
            }
            int j;

            for (j = 0; j < ship.SlotitemList.Count; j++)
            {
                slots[j].Initialize(j, ship);
                slots[j].SetOnUIRemodelEquipSlotItemActionListener(OnUIRemodelEquipSlotItemActionListener);
                slots[j].Show();
            }
            if (ship.HasExSlot())
            {
                slots[j].Initialize(j, ship.SlotitemEx, ship);
                slots[j].Show();
            }
        }
 public void updateBannerWhenShipExist(bool openAnimation, bool isShutterHide = false)
 {
     if (!IsSet)
     {
         _shipFrame.SetActive(false);
         return;
     }
     SetShipFrameActive(active: true);
     StarManager.init(_ship.Srate);
     shipBanner.transform.gameObject.SetActive(true);
     shipBanner.SetShipData(_ship);
     _labelNumber.alpha = 1f;
     _gauge.alpha       = 1f;
     SetHpGauge();
     _labelLevel.alpha      = 1f;
     _labelLevel.textInt    = _ship.Level;
     _labelName.alpha       = 1f;
     _labelName.text        = _ship.Name;
     _labelName.color       = ((!_ship.IsMarriage()) ? new Color(0f, 0f, 0f) : new Color(1f, 0.7f, 0f));
     _labelName.effectColor = ((!_ship.IsMarriage()) ? new Color(1f, 1f, 1f) : new Color(0f, 0f, 0f));
     _labelTaikyu.alpha     = 1f;
     _labelTaikyu.text      = _ship.NowHp + "/" + _ship.MaxHp;
     if (openAnimation)
     {
         CloseBanner(animation: false);
         OpenBanner(!isShutterHide);
     }
 }
Exemplo n.º 3
0
 public void Init(ShipModel ship)
 {
     this.ship       = ship;
     labelName.text  = ship.Name;
     labelLevel.text = ship.Level.ToString();
     stars.init(ship.Srate);
     shipTypeMarkIcon.mainTexture = ResourceManager.LoadShipTypeIcon(ship);
     labelKaryoku.text            = ship.Karyoku.ToString();
     labelSoukou.text             = ship.Soukou.ToString();
     labelRaiso.text = ship.Raisou.ToString();
     labelTaiku.text = ship.Taiku.ToString();
 }
    public void Initialize(int realIndex, ShipModel model)
    {
        UITexture uITexture             = CommonShipBanner.GetUITexture();
        Texture   releaseRequestTexture = uITexture.mainTexture;

        uITexture.mainTexture = null;
        UserInterfaceRemodelManager.instance.ReleaseRequestBanner(ref releaseRequestTexture);
        mRealIndex = realIndex;
        mShipModel = model;
        CommonShipBanner.SetShipData(mShipModel);
        CommonShipBanner.StopParticle();
        uITexture.alpha = 1f;
        shipName.text   = mShipModel.Name;
        shipLevel.text  = mShipModel.Level.ToString();
        stars.init(mShipModel.Srate);
        mWidgetThis.alpha = 1f;
    }
 private bool Setup(int nIndex)
 {
     Awake();
     if (_uiBackground == null)
     {
         Util.FindParentToChild(ref _uiBackground, base.transform, "Background");
     }
     if (_uiIndex == null)
     {
         Util.FindParentToChild(ref _uiIndex, base.transform, "Index");
     }
     if (_uiHpSlider == null)
     {
         Util.FindParentToChild(ref _uiHpSlider, base.transform, "HPSlider");
     }
     if (_uiLv == null)
     {
         Util.FindParentToChild(ref _uiLv, base.transform, "Lv");
     }
     if (_uiName == null)
     {
         Util.FindParentToChild(ref _uiName, base.transform, "Name");
     }
     if (_uiSupplyState == null)
     {
         Util.FindParentToChild(ref _uiSupplyState, base.transform, "Materials");
     }
     if (_bunnerShutter == null)
     {
         Transform transform = base.transform.FindChild("BannerShutter");
         if (transform != null)
         {
             _bunnerShutter = ((Component)transform).GetComponent <BannerShutter>();
         }
     }
     _uiStarManager.init(0);
     _nIndex = nIndex;
     return(true);
 }