Question by
tomkevmuhsha · Oct 20, 2016 at 01:45 PM ·
2dscripting problemtexttutorialcount
Code to replace the count commands in C# for text.
I am making a an app similar to this. 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?
Comment
Your answer
Follow this Question
Related Questions
How to render text on top of the objects that are generated on the map using a script? 1 Answer
2d roguelike tutorial board manager issues 2 Answers
What is the most effective way to structure Card Effects in a Single Player game? 1 Answer
Multiple Sprites, One Script, Randomization 1 Answer
Any one help me in this script? 0 Answers