Ejemplo n.º 1
0
    public void Activate()
    {
        done         = false;
        actionPoints = maxPoints;
        EnemyBehaviour selected = null;

        foreach (var behav in behaviours)
        {
            if (behav.condition.Check(this))
            {
                selected = behav;
                break;
            }
        }
        if (!selected)
        {
            selected = behaviours[0];
        }
        selected.Activate(this);
    }