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