Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public override void Interrupt(AbilityCastData abilityCastData)
 {
     FinishGettingTargets(abilityCastData);
 }
Ejemplo n.º 4
0
 public virtual void Interrupt(AbilityCastData abilityCastData)
 {
 }
Ejemplo n.º 5
0
 public abstract IEnumerator Trigger(AbilityCastData abilityCastData);