Ejemplo n.º 1
0
 private void FillButtonLayout()
 {
     // Get unit's abilities
     // Foreach ability instantiate ability button prefab
     foreach (string id in unit.Unit.Combat.Abilities)
     {
         // Fill in information
         AbilityButton btn = Instantiate(abilityButtonPrefab);
         btn.SetAbility(id, this);
         btn.Title.text = GlobalAbilityDictionary.GetAbility(id).Name;
         btn.transform.SetParent(abilityListLayout.transform);
     }
 }
Ejemplo n.º 2
0
 public void ConfirmSelection()
 {
     gameObject.SetActive(false);
     unit.AbilityAction(GlobalAbilityDictionary.GetAbility(selectedAbilityID));
 }
Ejemplo n.º 3
0
 public void SelectAbility(string abilityID)
 {
     selectedAbilityID           = abilityID;
     abilityDescriptionText.text = GlobalAbilityDictionary.GetAbility(abilityID).GetDescription();
 }