Exemplo n.º 1
0
 public void SetupView(ItempediaDataAdapter item, bool active)
 {
     this._item = item;
     base.transform.Find("SelectedMark").gameObject.SetActive(false);
     base.transform.Find("ProtectedMark").gameObject.SetActive(false);
     base.transform.Find("NotEnough").gameObject.SetActive(false);
     base.transform.Find("Star").gameObject.SetActive(false);
     base.transform.Find("StigmataType").gameObject.SetActive(false);
     base.transform.Find("UnidentifyText").gameObject.SetActive(false);
     base.transform.Find("BG/Unselected").gameObject.SetActive(true);
     base.transform.Find("BG/Selected").gameObject.SetActive(false);
     base.transform.Find("Text").gameObject.SetActive(false);
     if (this._item == null)
     {
         base.transform.Find("ItemIcon").gameObject.SetActive(false);
     }
     else
     {
         base.transform.Find("ItemIcon").gameObject.SetActive(true);
         Sprite spriteByPrefab = Miscs.GetSpriteByPrefab(item.iconPath);
         base.transform.Find("ItemIcon/Icon").GetComponent <Image>().sprite = spriteByPrefab;
         base.transform.Find("ItemIcon").GetComponent <Image>().color       = Color.white;
         base.transform.Find("ItemIcon").GetComponent <Image>().sprite      = Miscs.GetSpriteByPrefab(MiscData.Config.ItemRarityBGImgPath[item.rarity]);
         this.SetupRarityView();
         this.SetupStigmataTypeIcon();
         if (!active)
         {
             this.SetItemGrey();
         }
         else
         {
             this.SetItemDefaultColor();
         }
     }
 }
Exemplo n.º 2
0
 public static int CompareToCostDesc(ItempediaDataAdapter lobj, ItempediaDataAdapter robj)
 {
     if (lobj.cost != robj.cost)
     {
         return(robj.cost - lobj.cost);
     }
     return(CompareToRarityDesc(lobj, robj));
 }
Exemplo n.º 3
0
 public static int CompareToBaseTypeDesc(ItempediaDataAdapter lobj, ItempediaDataAdapter robj)
 {
     if (lobj.baseType != robj.baseType)
     {
         return(robj.baseType - lobj.baseType);
     }
     return(CompareToRarityDesc(lobj, robj));
 }
Exemplo n.º 4
0
 public static int CompareToRarityDesc(ItempediaDataAdapter lobj, ItempediaDataAdapter robj)
 {
     if (lobj.rarity != robj.rarity)
     {
         return(robj.rarity - lobj.rarity);
     }
     if (lobj.level != robj.level)
     {
         return(robj.level - lobj.level);
     }
     return(robj.ID - lobj.ID);
 }
Exemplo n.º 5
0
 public static int CompareToSuiteDesc(ItempediaDataAdapter lobj, ItempediaDataAdapter robj)
 {
     if (lobj.suite == robj.suite)
     {
         return(CompareToRarityDesc(lobj, robj));
     }
     if (lobj.suite == 0)
     {
         return(1);
     }
     if (robj.suite == 0)
     {
         return(-1);
     }
     return(robj.suite - lobj.suite);
 }
Exemplo n.º 6
0
        private void OnItemButtonClick(ItempediaDataAdapter item)
        {
            bool unlock = false;

            int[] allUnlockItems = Singleton <ItempediaModule> .Instance.GetAllUnlockItems();

            int index  = 0;
            int length = allUnlockItems.Length;

            while (index < length)
            {
                if (item.ID == allUnlockItems[index])
                {
                    unlock = true;
                    break;
                }
                index++;
            }
            UIUtil.ShowItemDetail(item.GetDummyStorageItemData(), true, unlock);
        }