Esempio n. 1
0
    private void OnTriggerEnter(Collider other)
    {
        EnnemiObjective objective = other.gameObject.GetComponent <EnnemiObjective>();

        if (objective != null)
        {
            controler.changeObjective(other.transform, objective.isMoving);
        }
    }
Esempio n. 2
0
    public void chooseRandomObjective()
    {
        EnnemiObjective objective = pathFinder.selectRandomObjective();

        if (objective != null)
        {
            this.target        = objective.transform;
            this.targetCanMove = objective.isMoving;
            refreshPath();
        }
    }