コード例 #1
0
    void addTenItem()
    {
        string iconName = "";

        for (int i = 0; i < itemsIds.Length; i++)
        {
            GameObject go = GameObject.Instantiate(item_ten) as GameObject;
            go.SetActive(true);
            go.transform.parent     = grid_ten.transform;
            go.transform.localScale = Vector3.one;
            COM_ZhuanpanContent adata = ZhuanPanSystem.GetData((int)itemsIds[i]);
            if (adata == null)
            {
                continue;
            }

            //UITexture tex = go.GetComponentInChildren<UITexture>();
            iconName = ItemData.GetData((int)adata.item_).icon_;
            iconNames_.Add(iconName);
            UISprite sp = go.GetComponent <UISprite>();
            UIManager.Instance.AddItemCellUI(sp, (uint)adata.item_).ItemCount = (int)adata.itemNum_;

            //HeadIconLoader.Instance.LoadIcon(iconName, tex);
            UILabel lab = go.GetComponentInChildren <UILabel>();
            lab.text = ItemData.GetData((int)adata.item_).name_;
            grid_ten.repositionNow = true;
        }
    }
コード例 #2
0
    void ShoeOneItems()
    {
        //onenameL;
        oneObj.SetActive(true);

        COM_ZhuanpanContent adata = ZhuanPanSystem.GetData((int)itemsIds[0]);

        if (adata == null)
        {
            return;
        }
        ItemCellUI icell = UIManager.Instance.AddItemCellUI(oneiconback, (uint)adata.item_);

        onenameL.text   = ItemData.GetData((int)adata.item_).name_;
        icell.ItemCount = (int)adata.itemNum_;
    }
コード例 #3
0
 void ShowItems(List <COM_Zhuanpan> zhans)
 {
     for (int i = zhans.Count - 1; i >= 0; i--)
     {
         COM_ZhuanpanContent adata = ZhuanPanSystem.GetData((int)zhans[i].zhuanpanId_);
         //ZhuanpanConfigData adata = ZhuanpanConfigData.GetData((int)zhans[i].zhuanpanId_);
         GameObject go = GameObject.Instantiate(item.gameObject) as GameObject;
         go.SetActive(true);
         go.transform.parent     = conGrid.transform;
         go.transform.localScale = Vector3.one;
         UILabel la = go.GetComponent <UILabel>();
         la.text = zhans[i].playerName_ + ":" + "[-][f6f204]" + " " + ItemData.GetData((int)adata.item_).name_;
         conGrid.repositionNow = true;
     }
     GlobalInstanceFunction.Instance.Invoke(() => { sbar.value = 0; }, 2);
 }