Quantcast
Channel: Questions in topic: "count"
Viewing all articles
Browse latest Browse all 187

Code to replace the count commands in C# for text.

$
0
0
I am making a an app similar to [this](https://www.youtube.com/watch?v=38i4JQguH9s&t=219s). A scoring feature is added. Is there anyway to edit that code so instead of counting every time an object is picked up, that text is displayed instead. An example of the code to COUNT: if (other.gameObject.CompareTag("PickUp")) if (other.gameObject.CompareTag("PickUp")) { other.gameObject.SetActive(false); count = count + 1; countText.text = "Score: " + count.ToString(); } } void SetCountText() { countText.text = "Score: " + count.ToString (); } IS THERE ANY WAY THIS CODE CAN BE CHANGED TO DISPLAY A TEXT BOX, INSTEAD OF COUNTING WHEN AN OBJECT IS PICKED UP?

Viewing all articles
Browse latest Browse all 187

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>