private void FinishGettingTargets(AbilityCastData abilityCastData) { //Alert any listeners that we have now finished getting targets. onEndGettingTargets.Raise(); //Set the animator to not be targeting. abilityCastData.Animator.SetBool(hashIsTargeting, false); }
public override IEnumerator Trigger(AbilityCastData abilityCastData) { //Set the animator to be targeting. abilityCastData.Animator.SetBool(hashIsTargeting, true); //Alert any listeners that we are now getting targets. onStartGettingTargets.Raise(targetGetter); //Start a coroutine to get targets. CoroutineWithData getTargetsCoroutine = new CoroutineWithData(targetGetter.GetTargets()); yield return(getTargetsCoroutine.Run()); //Break if we did not get back a list of targets. if (!(getTargetsCoroutine.Result is List <ITargetable> targets)) { yield break; } //Set the currently stored targets to be the targets that were just collected. abilityCastData.AbilityActionHandler.CurrentTargets = targets; FinishGettingTargets(abilityCastData); }
public override void Interrupt(AbilityCastData abilityCastData) { FinishGettingTargets(abilityCastData); }
public virtual void Interrupt(AbilityCastData abilityCastData) { }
public abstract IEnumerator Trigger(AbilityCastData abilityCastData);