// Use this for initialization void Start() { asEngine = GetComponent <AudioSource> (); car = GetComponent <myCarController> (); gun = GameObject.Find("SpawnRay").GetComponent <GunController> (); timeBetweenShot = gun.GetTimeBetweenShot(); }
// Use this for initialization void Start() { delay = 3; end = false; car = GameObject.FindGameObjectWithTag("Player").GetComponent <myCarController> (); btnContinue.onClick.AddListener(Continue); btnExit.onClick.AddListener(Exit); btnGoBack.onClick.AddListener(goBack); PanelMenu.SetActive(false); Cursor.visible = false; textPlayerName.text = PlayerPrefs.GetString("PlayerName"); Time.timeScale = 1.0f; }