private void Start() { alcoholMeter = FindObjectOfType <AlcoholMeter>(); spawnAlcohol = FindObjectOfType <SpawnObject>(); scoreCalculator = FindObjectOfType <ScoreCalculator>(); playerCollisions = FindObjectOfType <PlayerCollisions>(); objectives = FindObjectOfType <Objectives>(); blink = FindObjectOfType <BlinkingEffect>(); carSound = FindObjectOfType <CarSound>(); audioSource = FindObjectOfType <AudioSource>(); }
//public GameObject void Start() { playerCollisions = FindObjectOfType <PlayerCollisions>(); alcoholMeter = FindObjectOfType <AlcoholMeter>(); objectives = FindObjectOfType <Objectives>(); }
// Start is called before the first frame update void Start() { alcoholMeter = FindObjectOfType <AlcoholMeter>(); objectives = FindObjectOfType <Objectives>(); }
private void Start() { _player = GameObject.FindGameObjectWithTag("Player").transform; alcoholMeter = FindObjectOfType<AlcoholMeter>(); }