// Update is called once per frame void Update() { getStarCount = gameGenerator.GetComponent <GameGenerator>().star; GetComponent <Text>().text = "Star:" + getStarCount.ToString(); }
// Update is called once per frame void Update() { int setSpeed = (int)gameGenerator.GetComponent <GameGenerator>().distance; GetComponent <Text>().text = setSpeed.ToString() + "km"; }