public void Show(bool isHideButton = true) { mask = TransformControlUtility.CreateItem("Mask", UIUtility.GetRootCanvas()); mask.GetComponent <Image>().color = new Color32(0, 0, 0, 0); if (isHideButton) { mask.GetComponentInChildren <Button>().gameObject.SetActive(false); } }
public void Create(List <Score> list) { DeleteCreateList(); for (int i = 0; i < list.Count; i++) { GameObject newObject = TransformControlUtility.CreateItem(item, item.transform.parent); newObject.SetActive(true); newObject.transform.Find("index").GetComponent <Text>().text = (i + 1).ToString(); newObject.transform.Find("name").GetComponent <Text>().text = list[i].userName; newObject.transform.Find("score").GetComponent <Text>().text = list[i].fightScore.ToString(); newObject.transform.Find("life").GetComponent <Text>().text = list[i].lifeValue.ToString(); createLsit.Add(newObject); } }