示例#1
0
        public virtual void OnActionExit(AISController ctrl)
        {
            if (!controllers.Contains(ctrl))
            {
                return;
            }

            switch (exe)
            {
            case Execution.Parallel:
                foreach (AISAction c in children)
                {
                    c.OnActionExit(ctrl);
                }
                break;

            case Execution.Best_Score:
                foreach (AISScorer s in children.SelectMany(x => x.scorers))
                {
                    s.StopScoring(ctrl);
                }
                if (children.Count != 0)
                {
                    bestChild[ctrl].OnActionExit(ctrl);
                    bestChild.Remove(ctrl);
                }
                break;

            case Execution.Sequential: break;
            }

            if (!following)
            {
                ctrl.StopCoroutine(coroutines[ctrl]);
                coroutines.Remove(ctrl);
            }

            controllers.Remove(ctrl);

            if (controllers.Count == 0)
            {
                Final();
            }
        }
示例#2
0
 public virtual void StopScoring(AISController ctrl)
 {
     score.Remove(ctrl);
     ctrl.StopCoroutine(coroutines[ctrl]);
     coroutines.Remove(ctrl);
 }