예제 #1
0
    public void SetData(int iHave, int iNeed, int itemType)
    {
        string color;

        if (iNeed > iHave)
        {
            color = "[FF0000]";
        }
        else
        {
            color = "[FFFFFF]";
        }
        if (m_wndType == 1)
        {
            MyHead.LblNeedNum.text = string.Format(color + "{0}[-]", iNeed);
        }
        else if (m_wndType == 2)
        {
            MyHead.LblNeedNum.text = string.Format(color + "{0}/{1}[-]", iHave, iNeed);
        }
        m_itemType = itemType;
        string iCon = ItemM.GetItemIcon(itemType);

        NGUIUtil.Set2DSprite(MyHead.sprIcon, "Textures/item/", iCon);
    }