public void PlusNum(int num = 1) { this.num += num; itemcount.GetComponent <Text> ().text = this.num.ToString(); Drag2 item = this.GetComponentInChildren <Drag2> (); item.count = this.num; }
public void setId(int id, int num = 1) { this.id = id; info = ObjectsInfo.instance.FindObjecInfoById(id); Drag2 item = this.GetComponentInChildren <Drag2> (); item.setIconname(info.icon_name); itemcount.SetActive(true); this.num = num; itemcount.GetComponent <Text> ().text = num.ToString(); }