public void AddDynButton(string name, Met met, Transform holder) { GameObject go = Instantiate(button, holder.transform); ButtonHelper btnHelp = go.GetComponent <ButtonHelper>(); btnHelp.SetText(name); btnHelp.btn.onClick.AddListener(met.Invoke); }
public void AddAbilityButton(string name, Dia dia, Transform holder, int id) { GameObject go = Instantiate(button, holder.transform); ButtonHelper btnHelp = go.GetComponent <ButtonHelper>(); btnHelp.SetText(name); btnHelp.btn.onClick.AddListener(() => dia(id)); }
public void AddShopButton(string name, int id) { GameObject go = Instantiate(button, locButtonsHolder.transform); ButtonHelper btnHelp = go.GetComponent <ButtonHelper>(); btnHelp.SetText(name); btnHelp.btn.onClick.AddListener(() => GameLogic.instance.MoveToShop(id)); }