示例#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();
            }
        }
示例#2
0
        public void Init(ShipModel ship)
        {
            this.ship            = ship;
            this.labelName.text  = ship.Name;
            this.labelLevel.text = ship.Level.ToString();
            this.stars.init(ship.Srate);
            this.shipTypeMarkIcon.mainTexture = ResourceManager.LoadShipTypeIcon(ship);
            UIRemodelEquipSlotItem[] array = this.slots;
            for (int i = 0; i < array.Length; i++)
            {
                UIRemodelEquipSlotItem uIRemodelEquipSlotItem = array[i];
                uIRemodelEquipSlotItem.Hide();
            }
            int j;

            for (j = 0; j < ship.SlotitemList.get_Count(); j++)
            {
                this.slots[j].Initialize(j, ship);
                this.slots[j].SetOnUIRemodelEquipSlotItemActionListener(new UIRemodelEquipSlotItem.UIRemodelEquipSlotItemAction(this.OnUIRemodelEquipSlotItemActionListener));
                this.slots[j].Show();
            }
            if (ship.HasExSlot())
            {
                this.slots[j].Initialize(j, ship.SlotitemEx, ship);
                this.slots[j].Show();
            }
        }
示例#3
0
        private void InitSlotItems(ShipModel shipModel)
        {
            int i;

            for (i = 0; i < ship.SlotitemList.Count; i++)
            {
                slots[i].Initialize(i, shipModel);
                slots[i].Show();
            }
            if (ship.HasExSlot())
            {
                slots[i].Initialize(i, ship.SlotitemEx, shipModel);
                slots[i].Show();
            }
            else if (ship.Level >= 30)
            {
                bool isEnable = UserInterfaceRemodelManager.instance.mRemodelManager.HokyoZousetsuNum > 0;
                slots[i].InitExSlotButton(isEnable);
                slots[i].Show();
            }
        }
        public void Initialize(int index, SlotitemModel itemModel, ShipModel shipModel)
        {
            this.index  = index;
            this.mModel = itemModel;
            bool flag = false;

            this.isExSlot = (shipModel.HasExSlot() && shipModel.SlotCount <= index);
            base.get_transform().SetActiveChildren(true);
            if (this.ExSlotButton != null)
            {
                this.ExSlotButton.get_transform().get_parent().SetActive(false);
            }
            if (itemModel != null)
            {
                this.mLabel_Name.text = this.mModel.Name;
                if (itemModel.IsLocked())
                {
                    this.mLock_Icon.get_transform().set_localScale(Vector3.get_one());
                }
                else
                {
                    this.mLock_Icon.get_transform().set_localScale(Vector3.get_zero());
                }
                this.mSprite_TypeIcon.spriteName = "icon_slot" + itemModel.Type4;
                flag = itemModel.IsPlane(true);
                if (flag)
                {
                    this.mLabel_PlaneCount.text = shipModel.TousaiMax[index].ToString();
                }
            }
            else
            {
                this.mLabel_Name.text = "-";
                this.mLock_Icon.get_transform().set_localScale(Vector3.get_zero());
                this.mSprite_TypeIcon.spriteName = "icon_slot_notset";
            }
            this.mLabel_PlaneCount.SetActive(flag);
            this.SetPlaneSkill(itemModel);
            this.InitializeButtonColor(this.mButton_Action);
            this.levelStar.Init(itemModel);
            if (this.isExSlot)
            {
                this.ChangeExMode();
            }
            else
            {
                this.ChangeNormalMode();
            }
        }
示例#5
0
        public void Initialize(int index, SlotitemModel itemModel, ShipModel shipModel)
        {
            this.index = index;
            mModel     = itemModel;
            bool flag = false;

            isExSlot = (shipModel.HasExSlot() && shipModel.SlotCount <= index);
            base.transform.SetActiveChildren(isActive: true);
            if (ExSlotButton != null)
            {
                ExSlotButton.transform.parent.SetActive(isActive: false);
            }
            if (itemModel != null)
            {
                mLabel_Name.text = mModel.Name;
                if (itemModel.IsLocked())
                {
                    mLock_Icon.transform.localScale = Vector3.one;
                }
                else
                {
                    mLock_Icon.transform.localScale = Vector3.zero;
                }
                mSprite_TypeIcon.spriteName = "icon_slot" + itemModel.Type4;
                flag = itemModel.IsPlane(dummy: true);
                if (flag)
                {
                    mLabel_PlaneCount.text = shipModel.TousaiMax[index].ToString();
                }
            }
            else
            {
                mLabel_Name.text = "-";
                mLock_Icon.transform.localScale = Vector3.zero;
                mSprite_TypeIcon.spriteName     = "icon_slot_notset";
            }
            mLabel_PlaneCount.SetActive(flag);
            SetPlaneSkill(itemModel);
            InitializeButtonColor(mButton_Action);
            levelStar.Init(itemModel);
            if (isExSlot)
            {
                ChangeExMode();
            }
            else
            {
                ChangeNormalMode();
            }
        }
示例#6
0
 public void Forward2SoubiHenkouPreview(ShipModel targetShipModel, int selectedSlotIndex, UIRemodelEquipListChildNew child)
 {
     if (status == ScreenStatus.MODE_SOUBI_HENKOU_ITEM_SELECT)
     {
         SetStatus(ScreenStatus.MODE_SOUBI_HENKOU_PREVIEW);
         SlotitemModel srcSlotItemModel = null;
         if (selectedSlotIndex < targetShipModel.SlotitemList.Count)
         {
             srcSlotItemModel = targetShipModel.SlotitemList[selectedSlotIndex];
         }
         else if (targetShipModel.HasExSlot())
         {
             srcSlotItemModel = targetShipModel.SlotitemEx;
         }
         mUIRemodelSlotItemChangePreview.Initialize(mKeyController, targetShipModel, srcSlotItemModel, child.GetModel(), selectedSlotIndex);
     }
 }
示例#7
0
        public void SetSlotItems(ShipModel ship)
        {
            bool flag = ship.HasExSlot();

            for (int i = 0; i < SlotItem.Length; i++)
            {
                if (i < ship.SlotitemList.Count)
                {
                    SlotItem[i].SetSlotItem(ship.SlotitemList[i], ship, i, isExtention: false);
                }
                else if (flag)
                {
                    flag = false;
                    SlotItem[i].SetSlotItem(ship.SlotitemEx, ship, i, isExtention: true);
                }
                else
                {
                    SlotItem[i].SetActive(isActive: false);
                }
            }
        }
        public void SetSlotItems(ShipModel ship)
        {
            bool flag = ship.HasExSlot();

            for (int i = 0; i < this.SlotItem.Length; i++)
            {
                if (i < ship.SlotitemList.get_Count())
                {
                    this.SlotItem[i].SetSlotItem(ship.SlotitemList.get_Item(i), ship, i, false);
                }
                else if (flag)
                {
                    flag = false;
                    this.SlotItem[i].SetSlotItem(ship.SlotitemEx, ship, i, true);
                }
                else
                {
                    this.SlotItem[i].SetActive(false);
                }
            }
        }