void SetInitialReferences() { enemyMaster = GetComponent <Enemy_Master>(); enemyAnimationScript = GetComponent <Enemy_Animation>(); enemyHealthScript = GetComponent <Enemy_Health>(); myAudioSource = GetComponent <AudioSource>(); }
void SetInitialReferences() { enemyHealthScript = transform.root.GetComponent <Enemy_Health>(); myNavMeshAgent = transform.root.GetComponent <NavMeshAgent>(); enemyMaster = transform.root.GetComponent <Enemy_Master>(); myAnimator = GetComponent <Animator>(); }
void SetInitialReferences() { enemyMaster = GetComponent <Enemy_Master>(); enemyHealthScript = GetComponent <Enemy_Health>(); shouldStruck = true; if (GetComponent <Animator>() != null) { myAnimator = GetComponent <Animator>(); } }
void SetInitialReferences() { enemyMaster = GetComponent <Enemy_Master>(); enemyHealthScript = transform.root.GetComponent <Enemy_Health>(); myTransform = transform; if (GetComponent <NavMeshAgent>() != null) { myNavMeshAgent = GetComponent <NavMeshAgent>(); } checkRate = Random.Range(0.3f, 0.4f); }
void SetInitialReferences() { enemyMaster = transform.root.GetComponent <Enemy_Master>(); enemyHealthScript = transform.root.GetComponent <Enemy_Health>(); }