private void ClearActionData() { //Reset any variables that were to do with the actions that have just been finished. currentAction = null; currentActionsCoroutine = null; CurrentTargets = new List <ITargetable>(); }
private IEnumerator DoActions(List <AbilityAction> abilityActions) { //Loop through all of the actions for the useable. foreach (AbilityAction abilityAction in abilityActions) { //Cache the current action currentAction = abilityAction; //Pause execution here until the current action's "Trigger" coroutine is complete. yield return(abilityAction.Trigger(abilityCastData)); } ClearActionData(); }