Beispiel #1
0
    void Awake()
    {
        enermy_Animator = GetComponent <EnermyAnimator>();
        navmesh_Agent   = GetComponent <NavMeshAgent>();
        target          = GameObject.FindWithTag(Tags.PLAYER_TAG).transform;

        enermyAudio = GetComponentInChildren <EnermyAudio>();
    }
Beispiel #2
0
    void Awake()
    {
        if (is_Boar || is_Cannibal)
        {
            enermy_Anim       = GetComponent <EnermyAnimator>();
            enermy_Controller = GetComponent <EnermyController>();
            navAgent          = GetComponent <NavMeshAgent>();

            enermyAudio = GetComponentInChildren <EnermyAudio>();
        }
        if (is_Player)
        {
            playerState = GetComponent <PlayerState>();
        }
    }