Esempio n. 1
0
    public void EvaluateBehaviours()
    {
        AIBehaviour newBehaviour = behaviours.ToList().OrderByDescending(x => x.GetNormalizedScore()).First();

        if (newBehaviour != currentBehaviour)
        {
            Debug.Log(newBehaviour.GetType().Name);
            currentBehaviour?.OnExit();
            currentBehaviour = newBehaviour;
            currentBehaviour?.OnEnter();
        }
    }