Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 public override void Interrupt(AbilityCastData abilityCastData)
 {
     FinishGettingTargets(abilityCastData);
 }
Exemple #4
0
 public virtual void Interrupt(AbilityCastData abilityCastData)
 {
 }
Exemple #5
0
 public abstract IEnumerator Trigger(AbilityCastData abilityCastData);