public void turnObstacles() { GameObject go = GameObject.FindGameObjectWithTag("SharedVariables"); ShareVariables sv = go.GetComponent <ShareVariables>(); sv.resetObstacles(); }
// Use this for initialization void Start() { shared = GameObject.FindGameObjectWithTag("SharedVariables"); sv = shared.GetComponent <ShareVariables>(); inst = GameObject.FindGameObjectWithTag("Instructions"); inst.SetActive(false); }
// Use this for initialization void Start() { sv = GameObject.FindGameObjectWithTag("SharedVariables").GetComponent <ShareVariables>(); displayer = GameObject.FindGameObjectWithTag("Result"); scoreDisplay = displayer.GetComponent <Text>(); scoreDisplay.text = ""; StartCoroutine(showResult(sv.result)); }
// Use this for initialization void Start() { timer = delaytimer; cam = Camera.main; cameraHeight = 2f * cam.orthographicSize; cameraWidth = cameraHeight * cam.aspect; shared = GameObject.FindGameObjectWithTag("SharedVariables"); sv = shared.GetComponent <ShareVariables>(); }
void OnEnable() { countdownDisplayer = GameObject.FindGameObjectWithTag("Countdown"); text = countdownDisplayer.GetComponent <Text>(); SceneManager.sceneLoaded += StartCountDown; car = GameObject.FindGameObjectWithTag("Car"); coinSpawner = GameObject.FindGameObjectWithTag("CoinSpawner"); tyreSpawner = GameObject.FindGameObjectWithTag("TyreSpawner"); fuelSpawner = GameObject.FindGameObjectWithTag("FuelSpawner"); carSpawner = GameObject.FindGameObjectWithTag("CarSpawner"); source = GetComponent <AudioSource>(); sv = GameObject.FindGameObjectWithTag("SharedVariables").GetComponent <ShareVariables>(); }
// Use this for initialization void Start() { timer = delaytimer; cam = Camera.main; cameraHeight = 2f * cam.orthographicSize; cameraWidth = cameraHeight * cam.aspect; Debug.Log(cameraWidth); shared = GameObject.FindGameObjectWithTag("SharedVariables"); sv = shared.GetComponent <ShareVariables>(); foreach (GameObject tree in trees) { tree.GetComponent <EnemycarMove>().speed = treeSpeed; } }
// Use this for initialization void Start() { timer = delaytimer; shared = GameObject.FindGameObjectWithTag("SharedVariables"); sv = shared.GetComponent <ShareVariables>(); }
// Use this for initialization void Start() { source = GetComponent <AudioSource>(); sv = GameObject.FindGameObjectWithTag("SharedVariables").GetComponent <ShareVariables>(); }