예제 #1
0
    public void AddAbilityButton(int _index, string _name)
    {
        ButtonAbility button = Instantiate(Resources.Load <ButtonAbility>("Prefabs/AbilityButton"), transform.Find("InfoHolder"));

        button.Initialize(SelectionManager.GetSelectedUnit(), _index, _name);
        AddAbilityButton(button);
    }
예제 #2
0
 public void AddAbilityButton(ButtonAbility _button)
 {
     _button.GetComponent <RectTransform>().position += new Vector3(0, offset, 0);
     offset += offset_size;
     buttons.Add(_button);
 }