void Init() { for (int i = 0; i < transform.childCount; i++) { Transform tran = transform.Find("Button_" + i); SkillSlot skillSlot = new SkillSlot(tran, i); skillSlots.Add(skillSlot); ButtonOnPress button = tran.GetComponent <ButtonOnPress>(); button.AddListener(i, OnPress); if (i == 2 || i == 3) { skillSlot.SetFuryEffect(); } } }