示例#1
0
    IEnumerator LoadBagSlot(List <ItemInfo> items)
    {
        yield return(null);

        foreach (ItemInfo item in items)
        {
            if (item.Place < 31)
            {
                continue;
            }
            GameObject slotObj = GameObject.Find("BagSlot (" + (item.Place - 31).ToString() + ")");
            if (slotObj == null)
            {
                continue;
            }
            BagSlotController slot = slotObj.GetComponent <BagSlotController>();
            if (slot == null)
            {
                continue;
            }
            string equipType = getEquipType(item.Pic);
            Debug.Log(sexEquipString + equipType + "/" + item.Pic + "/icon_1");
            slot.LoadDisplay(sexEquipString + equipType + "/" + item.Pic + "/icon_1");
        }
    }
示例#2
0
 void DeselectSlotInList(ref List <BagSlotController> bscl, ref int selecting)
 {
     if (selecting > -1)
     {
         BagSlotController bsc = bscl[selecting];
         if (bsc.isSelected)
         {
             bsc.Select();
         }
         selecting = -1;
     }
 }
示例#3
0
    void loadToSlot(bool isMale, string slotPrefix, int place, ItemInfo item)
    {
        // Debug.Log(slotPrefix +" ("+place.ToString()+")");
        GameObject gO = GameObject.Find(slotPrefix + " (" + place.ToString() + ")");

        if (gO == null)
        {
            return;
        }
        BagSlotController slot = gO.GetComponent <BagSlotController>();

        if (slot == null)
        {
            return;
        }
        Texture2D te = tryLoadEquipDisplay(isMale, item);

        // Debug.Log("Loading " + slotPrefix + " " + place + "-" + item.Pic +" : " +(te != null));
        slot.LoadDisplay(te);
    }