Ejemplo n.º 1
0
 private void ChangeAbility(object sender, AbilityButton.OnAbilityButtonClickArgs e)
 {
     MovementUI.DestroyMovementUI();
     Unit.ActiveUnit.selectedAbility = e.SelectedAbility;
     ActivatePanel();
     abilityDescription.GetComponent <Text>().text = e.SelectedAbility.Description;
     executeButton.transform.GetChild(0).GetComponent <Text>().text = e.SelectedAbility.Name;
 }
Ejemplo n.º 2
0
 public void ChangedAbility(object sender, AbilityButton.OnAbilityButtonClickArgs e)
 {
     if (e.SelectedAbility.TargetingType == Single)
     {
         if (!Unit.ActiveUnit.targetUnit)
         {
             Unit.ActiveUnit.targetUnit = Unit.ActiveUnit.EnemiesInLineOfSight()[0];
         }
         UpdateTargetPanel();
     }
     else
     {
         TargetButton.DestroyAll();
     }
 }