示例#1
0
    public void setID(int id, int num = 1)
    {
        this.id  = id;
        this.num = num;
        info     = ObjectsInfo.instance.GetObjectInfoById(id);
        Inventory_item item = this.GetComponentInChildren <Inventory_item>();

        item.setId(id);
        text.enabled = true;
        text.text    = num.ToString();
    }
示例#2
0
    public void ClearInfo()
    {
        skillItemIcon  sti    = this.GetComponentInChildren <skillItemIcon> ();
        Inventory_item inItem = this.GetComponentInChildren <Inventory_item>();

        if (sti)
        {
            Destroy(sti.gameObject);
        }
        if (inItem)
        {
            Destroy(inItem.gameObject);
        }
    }