Exemplo n.º 1
0
        public virtual void OnActionEnter(AISController ctrl)
        {
            if (!init)
            {
                Init();
            }

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

            case Execution.Best_Score:
                if (children.Count != 0)
                {
                    foreach (AISScorer s in children.SelectMany(x => x.scorers))
                    {
                        s.StartScoring(ctrl);
                    }
                    bestChild.Add(ctrl, BestAction(ctrl));
                    bestChild[ctrl].OnActionEnter(ctrl);
                }
                break;

            case Execution.Sequential:

                break;
            }

            if (!following)
            {
                coroutines.Add(ctrl, ctrl.StartCoroutine(ActionCoroutine(ctrl)));
            }

            controllers.Add(ctrl);
        }
Exemplo n.º 2
0
 public virtual void StartScoring(AISController ctrl)
 {
     score.Add(ctrl, 0);
     coroutines.Add(ctrl, ctrl.StartCoroutine(ScoreCoroutine(ctrl)));
 }