Exemple #1
0
        private void switchState(Actor.Actor actor, Max max)
        {
            double      distance = calculateDistance(actor, max);
            Enemy       enemy    = (Enemy)actor;
            PatrolState patrol   = (PatrolState)enemy.state.state;

            if (distance <= 200 && patrol.atitude != PatrolState.Atitude.pursue)
            {
                patrol.changeState(PatrolState.Atitude.pursue);
            }
        }