protected override IEnumerator InitializeCoroutine(SlotitemModel slotitemModel)
        {
            _sm = slotitemModel;
            base.InitializeCoroutine(_sm);
            ItemName.text = _sm.Name;
            Rare.text     = Util.RareToString(_sm.Rare);
            string slotItemNo = _sm.Type4.ToString();

            ItemIcon.spriteName = "icon_slot" + slotItemNo;
            levelStar.Init(_sm);
            locked = _sm.IsLocked();
            SetLockedIconVisible(locked);
            yield return(null);
        }
Пример #2
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();
            }
        }
        public void Initialize(int realIndex, SlotitemModel slotitemModel)
        {
            mRealIndex     = realIndex;
            mSlotItemModel = slotitemModel;
            ItemName.text  = mSlotItemModel.Name;
            Rare.text      = Util.RareToString(mSlotItemModel.Rare);
            string str = mSlotItemModel.Type4.ToString();

            ItemIcon.spriteName = "icon_slot" + str;
            levelStar.Init(mSlotItemModel);
            SetPlaneSkill(mSlotItemModel);
            locked = mSlotItemModel.IsLocked();
            SetLockedIconVisible(locked);
            mWidgetThis.alpha = 1f;
        }