Exemple #1
0
    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);
    }
Exemple #2
0
    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));
    }
Exemple #3
0
    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));
    }