public void TapBackpackSelect(NodeBackpackItem backpack) { Debug.Log("TapBackpackSelect(S)"); this.CurrentSelectBackpack = new Item(backpack.txtName.text); for (int ii = 0; ii < BackpackList.Count; ii++) { Debug.Log("BackpackList: " + BackpackList[ii].txtName.text); BackpackList[ii].imgSelect.gameObject.SetActive(false); } backpack.imgSelect.gameObject.SetActive(true); }
public void ConstructBackpackView() { foreach (Transform n in ContentBackpack.transform) { GameObject.Destroy(n.gameObject); } ContentBackpack.GetComponent <RectTransform>().sizeDelta = new Vector2(0, 0); BackpackList.Clear(); int counter = 0; for (int ii = 0; ii < One.TF.BackpackList.Count; ii++) { NodeBackpackItem current = Instantiate(nodeBackpackItem) as NodeBackpackItem; current.Construct(ContentBackpack, One.TF.BackpackList[ii].ItemName, One.TF.BackpackList[ii].StackValue, ii, counter); counter++; BackpackList.Add(current); } }
/// <summary> /// バックパックアイテムを生成します。 /// </summary> private void CreateBackpack(GameObject content, NodeBackpackItem node, string item_name, int item_num, int num, int counter) { Instantiate(node).Construct(content, item_name, item_num, num, counter); }