private void Awake() { birdSensor = transform.root.GetComponentInChildren <BirdSensor>(); RandomizePipeHeights(); pipePassedEventChannel = GameObject.FindWithTag(Tags.GameController) .GetComponent <PipePassedEventChannel>(); }
private void Awake() { birdSensor = transform.root.GetComponentInChildren <BirdSensor>(); pipePassedEventChannel = GameObject.FindGameObjectWithTag(Tags.GameController). GetComponent <PipePassedEventChannel>(); if (upperPipe == null) { Debug.Log("Could not find the upper pipe!"); } if (lowerPipe == null) { Debug.Log("Could not find the lower pipe!"); } if (birdSensor == null) { Debug.Log("Could not find the birdSensor component!"); } if (pipePassedEventChannel == null) { Debug.Log("PipePassedEventChannel or GameController not found!"); } RandomizePipeHeights(); RandomizePipeWidths(upperPipe); RandomizePipeWidths(lowerPipe); }
private void Awake() { RandomizePipes(); birdSensor = transform.root.GetComponentInChildren <BirdSensor>(); }