void Awake() { m_shootCooldown = 0f; m_sight = GetComponent <enemySight> (); m_health = GetComponent <enemyHealth> (); m_player = FindObjectOfType <playerController> ().gameObject; }
protected override void Awakes() { sight = GetComponentInChildren <enemySight>(); moves = GetComponent <Moves>(); jump = GetComponent <Jump>(); chouhencooldown = 0; }
// Use this for initialization void Awake() { anim = GetComponent<Animator>(); alerted = false; health = 10; wayPoint = 0; patrolTimer = 0; EnemySight = GetComponent<enemySight> (); navAgent = GetComponent<NavMeshAgent> (); player = GameObject.FindGameObjectWithTag ("Player").transform; lastPlayerSighting = GameObject.FindGameObjectWithTag ("GameController").GetComponent<LastPlayerSighting> (); }
// Use this for initialization protected virtual void Awake() { m_healthController = GetComponent <enemyHealth> (); m_sightController = GetComponent <enemySight> (); m_shootController = GetComponent <enemyShoot> (); player = GameObject.FindGameObjectWithTag("Player"); anim = GetComponent <Animator>(); audios = GetComponents <AudioSource> (); detectSource = audios [0]; hitSource = audios [1]; if (audios.Length == 3) { shootsound = audios [2]; } }
void Awake() { MySight = GetComponent <enemySight> (); Player = GameObject.FindGameObjectWithTag("Player"); }
void Awake(){ MySight = GetComponent<enemySight> (); Player = GameObject.FindGameObjectWithTag ("Player"); }