/// <summary> /// 显示消耗物品UI /// </summary> private void ShowConsUI() { m_GoldTxt.text = m_HeroT.getGold().ToString(); if (m_HeroT.getStuff() <= 0) { return; } ItemTemplate itemT = (ItemTemplate)DataTemplate.GetInstance().m_ItemTable.getTableData(m_HeroT.getStuff()); int count = InterfaceControler.GetInst().ReturnItemCount(m_HeroT.getStuff()); string countStr = count > 0 ? count.ToString() : "<color=red>" + count + "</color>"; string str = string.Format("{0}/{1}", countStr, m_HeroT.getNumbers()); m_DebTxt.text = str; m_ConsImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + itemT.getIcon()); }