void SetInitialReferences() { enemyMaster = GetComponent <Enemy_Master>(); if (GetComponent <Animator>() != null) { myAnimator = GetComponent <Animator>(); } }
void SetInitialReferences() { enemyMaster = GetComponent <Enemy_Master>(); if (GetComponent <UnityEngine.AI.NavMeshAgent>() != null) { myNavMeshAgent = GetComponent <UnityEngine.AI.NavMeshAgent>(); } }
void SetInitialReferences() { enemyMaster = GetComponent <Enemy_Master>(); checkRate = Random.Range(0.1f, 0.2f); if (GetComponent <UnityEngine.AI.NavMeshAgent>() != null) { myNavMeshAgent = GetComponent <UnityEngine.AI.NavMeshAgent>(); } }
void SetInitialReferences() { enemyMaster = GetComponent <Enemy_Master>(); myTransform = transform; if (GetComponent <UnityEngine.AI.NavMeshAgent>() != null) { myNavMeshAgent = GetComponent <UnityEngine.AI.NavMeshAgent>(); } checkRate = Random.Range(0.3f, 0.4f); }
void SetInitialReferences() { enemyMaster = GetComponent <Enemy_Master>(); myTransform = transform; if (head == null) { head = myTransform; } checkRate = Random.Range(0.8f, 1.2f); }
void SetInitialReferences() { enemyMaster = transform.root.GetComponent <Enemy_Master>(); if (GetComponent <Collider>() != null) { myCollider = GetComponent <Collider>(); } if (GetComponent <Rigidbody>() != null) { myRigidBody = GetComponent <Rigidbody>(); } ////Edit: Redid it using Inspector since the Golem head started to fly off during enable state. ////New Code. Enable the Projection to make sure that enemy doesn't behave funny during death. //if (GetComponent<CharacterJoint>() != null) //{ // GetComponent<CharacterJoint>().enableProjection = true; //} }
void SetInitialReferences() { enemyMaster = GetComponent <Enemy_Master>(); }
void SetInitialReferences() { enemyMaster = GetComponent <Enemy_Master>(); myTransform = transform; }
void SetInitialReferences() { enemyMaster = transform.root.GetComponent <Enemy_Master>(); }