// Use this for initialization void Start() { carbehaviour = GameObject.FindGameObjectWithTag("Player").GetComponent <CarBehaviour>(); terrainManager = GameObject.FindGameObjectWithTag("terrainManager").GetComponent <TerrainManager>(); drt = GameObject.FindGameObjectWithTag("Player").GetComponent <DRTStimulus>(); setDefault(); }
/// <summary> /// Logic that runs when we actually start the game /// </summary> public void OnStartGame() { // Hide all screens except the HUD and start a countdown UIManager.Instance.ShowHUD(true); UIManager.Instance.ShowScreen(""); countdown = 3; // Call ShowCountdown every 1 second, starting now InvokeRepeating("ShowCountdown", 0f, 1f); // Start timer terrainManager.setTimer(true); DRT = GameObject.FindGameObjectWithTag("Player").GetComponent <DRTStimulus>(); DRT.setTimer(true); }