예제 #1
0
    NavMeshAgent nav;               // Reference to the nav mesh agent.


    void Awake()
    {
        // Set up the references.
        player       = GameObject.FindGameObjectWithTag("Player").transform;
        playerHealth = player.GetComponent <SV_PlayerHealth>();
        enemyHealth  = GetComponent <SV_EnemyHealth>();
        nav          = GetComponent <NavMeshAgent>();
    }
예제 #2
0
    float timer;                                // Timer for counting up to the next attack.


    void Awake()
    {
        // Setting up the references.
        player       = GameObject.FindGameObjectWithTag("Player");
        playerHealth = player.GetComponent <SV_PlayerHealth>();
        enemyHealth  = GetComponent <SV_EnemyHealth>();
        anim         = GetComponent <Animator>();
    }