Пример #1
0
    private int wayPointIndex;                                  // A counter for the way point array.


    void Awake()
    {
        enemySight         = GetComponent <EnemySight>();
        nav                = GetComponent <NavMeshAgent>();
        player             = GameObject.FindGameObjectWithTag(Tags.player).transform;
        playerHealth       = player.GetComponent <PlayerHealth>();
        lastPlayerSighting = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <LastPlayerSighting2>();
    }
Пример #2
0
 void Awake()
 {
     // Setting up the references.
     anim           = GetComponent <Animator>();
     playerMovement = GetComponent <PlayerMovement>();
     hash           = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <HashIDs>();
     //sceneFadeInOut = GameObject.FindGameObjectWithTag(DoneTags.fader).GetComponent<DoneSceneFadeInOut>();
     lastPlayerSighting = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <LastPlayerSighting2>();
     audio = GetComponent <AudioSource> ();
 }
Пример #3
0
    void Awake()
    {
        nav  = GetComponent <NavMeshAgent>();
        col  = GetComponent <SphereCollider>();
        anim = GetComponent <Animator>();
        lastPlayerSighting = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <LastPlayerSighting2>();
        player             = GameObject.FindGameObjectWithTag(Tags.player);
        playerAnim         = player.GetComponent <Animator>();
        playerHealth       = player.GetComponent <PlayerHealth>();
        hash = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <HashIDs>();

        personalLastSighting = lastPlayerSighting.resetPosition;
        previousSighting     = lastPlayerSighting.resetPosition;
    }