Ejemplo n.º 1
0
    void Update()
    {
        if (target != null)
        {
            navMeshAgent.SetDestination(target.position);
        }

        /*check if game is over ? */
        if (!gameManager.IsGameOver())
        {
            /*find the animal where it is*/
            LocateAnimal();
        }
        /*keep checking whether the animal has been picked up or not*/
        CheckAnimalHasBeenPicked();

        /*if yes, then divert to another location*/
        //....DONE

        /*once it reaches the diverted location, respawn from it soriginal location*/
        //....DONE

        /*if not, destroy that animal, and spawn another at different position*/
        //....DONE

        /*keep going, until 5 animals are not caught*/
        //....DONE

        CheckDisatanceBetweeenPoacherAlternateTarget();
    }