void Start() { GameObject controller = GameObject.FindWithTag("GameController"); GameObject tankSoundControl = GameObject.FindWithTag("TankSoundController"); GameObject airStrikeControl = GameObject.FindWithTag("AirStrikeController"); if (controller != null) { tankSoundController = tankSoundControl.GetComponent <TankSoundController>(); lifeController = controller.GetComponent <LifeController>(); consecutiveHitController = controller.GetComponent <ConsecutiveHitController>(); airStrikeController = airStrikeControl.GetComponent <AirStrikeController>(); } else { Debug.Log("Cannot find game controller"); } }
void Start() { consecutiveHits = 0; consecutiveHitText.text = "CONSECUTIVE HITS: 0"; airStrikeController = GameObject.FindWithTag("AirStrikeController").GetComponent <AirStrikeController>(); }