void CreateAttributeElement_Mini(List <AttributeSlot> l, Transform p, AttributeType t) { AttributeSlot a = new AttributeSlot(); a.type = t; l.Add(a); GameObject g = Instantiate(weaponInfo.slot_mini) as GameObject; g.transform.SetParent(p); a.slot = g.GetComponent <InventoryUISlot>(); a.slot.text1.text = "-"; g.SetActive(true); g.transform.localScale = Vector3.one; }
void CreateAttributeElement(List <AttributeSlot> l, Transform p, AttributeType t, string txt1Text = null) { AttributeSlot a = new AttributeSlot(); a.type = t; l.Add(a); GameObject g = Instantiate(playerStatus.slotTemplate) as GameObject; g.transform.SetParent(p); a.slot = g.GetComponent <InventoryUISlot>(); if (string.IsNullOrEmpty(txt1Text)) { a.slot.text1.text = t.ToString(); } else { a.slot.text1.text = txt1Text; } a.slot.text2.text = "30"; g.SetActive(true); g.transform.localScale = Vector3.one; }