Exemplo n.º 1
0
 public void SetData(string icon, string name, int count)
 {
     AssetRef.setImage(mIcon, icon);
     mNum.text = count.ToString();
     if (mName != null)
     {
         mName.text = name.ToString();
     }
 }
Exemplo n.º 2
0
    void showItem(Item item)
    {
        if (item.type == 2)
        {
            return;
        }
        if (item.img == null)
        {
            item.img = allocImage();
        }
        Image         img = item.img;
        RectTransform t   = img.rectTransform;

        t.sizeDelta = new Vector2(imageSize, imageSize);
        if (AssetRef.setImage(img, "UI/Icon/Shop/jinbi") && imageSize <= 0)
        {
            img.SetNativeSize();
        }
        Vector3 lp = t.localPosition;

        lp.x            = item.pos.x + t.sizeDelta.x / 2; lp.y = item.pos.y;
        t.localPosition = lp;
    }
Exemplo n.º 3
0
 public void SetData(string nick, string head, int lv)
 {
     mNick.text  = nick;
     mLevel.text = lv.ToString();
     AssetRef.setImage(mIcon, head);
 }