void Start() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { gameController = gameControllerObject.GetComponent <GameControllerSingle>(); } if (gameController == null) { Debug.Log("Cannot find 'GameController' script"); } }
// Use this for initialization void Start() { gameController = controller.GetComponent <GameControllerSingle>(); WarningSpeakerSource = WarningSpeaker.GetComponent <AudioSource>(); }