void SetInitialReferences() { enemyMaster = GetComponent <EnemyMaster>(); myTransform = transform; if (head == null) { head = myTransform; } checkRate = Random.Range(0.8f, 1.2f); fieldOfView = Mathf.Cos(fieldOfView * Mathf.Deg2Rad); }
void SetInitialReferences() { enemyMaster = transform.root.GetComponent <EnemyMaster>(); if (GetComponent <Collider>() != null) { myCollider = GetComponent <Collider>(); } if (GetComponent <Rigidbody>() != null) { myRigidbody = GetComponent <Rigidbody>(); } }
void SetInitialReferences() { enemyMaster = GetComponent <EnemyMaster>(); myTransform = transform; }
void SetInitialReferences() { enemyMaster = transform.root.GetComponent <EnemyMaster>(); }
void SetInitialReferences() { enemyMaster = GetComponent <EnemyMaster>(); }