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=jTtCsOjNwJQ&list=PLX2vGYjWbI0RZ3M5zSs-cegtIzv-FBi4q/ "title"). In the 8th video, 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")) { other.gameObject.SetActive(false); count = count + 1; countText.text = "Count: " + count.ToString(); } } void SetCountText() { countText.text = "Count: " + count.ToString (); }

Viewing all articles
Browse latest Browse all 187

Trending Articles