// Use this for initialization void Start() { audioSource = GetComponents <AudioSource>()[0]; hitAudioSource = GetComponents <AudioSource>()[1]; tb = gameObject.GetComponent <TimeBehaviour>(); rateCounter = 0.0f; shielded = false; playCharging = false; gameObject.GetComponent <Renderer>().material = matOff; squadManager = GetComponentInParent <SquadManager>(); audioSource.Play(); audioSource.clip = gunshot; //shotTimeCounter = chargeTime; shotDurationCounter = shotDuration; wingTimeCounter = 0.0f; ela = GetComponent <EnemyLookAt>(); foreach (Transform child in transform) { if (child.gameObject.name == "AlienSniperWings") { wings = child.gameObject; break; } } }
// Use this for initialization void Start() { doubleShotSpeed = false; ela = GetComponent <EnemyLookAt>(); start = false; audioSource = GetComponent <AudioSource>(); hitFeedbackCounter = 0.0f; }
// Use this for initialization void Start() { hitAudioSource = GetComponent <AudioSource>(); hit = false; materialHitOn = false; alive = true; shooting = false; moveDown = false; shotCounter = shotDuration; shotRechargeTime = Random.Range(4.0f, 6.0f); ela = GetComponent <EnemyLookAt>(); }