Пример #1
0
 public bool Init(SlotitemModel_Battle model)
 {
     if (model == null || !model.IsPlane())
     {
         return(false);
     }
     uiTexture.mainTexture = SlotItemUtils.LoadUniDirGlowTexture(model);
     uiTexture.localSize   = ResourceManager.SLOTITEM_TEXTURE_SIZE[7];
     return(true);
 }
Пример #2
0
            public bool SetSlotItem(SlotitemModel_Battle model, bool isSlotIconActive)
            {
                bool flag = model?.IsPlane() ?? false;

                _isPlane = flag;
                _uiSlotIcon.mainTexture = ((model == null) ? null : ((!flag) ? SlotItemUtils.LoadTexture(model) : SlotItemUtils.LoadUniDirTexture(model)));
                _uiSlotIcon.localSize   = ((!flag) ? ResourceManager.SLOTITEM_TEXTURE_SIZE[4] : ResourceManager.SLOTITEM_TEXTURE_SIZE[7]);
                _uiSlotName.text        = ((model != null && !flag) ? model.Name : string.Empty);
                this.isSlotIconActive   = isSlotIconActive;
                return(true);
            }