Unity 2D UFO Lesson 4 Counting Collectables and Displaying Score - jasonweibel/HyperStream-Unity GitHub Wiki
Hyperstream : Unity 2D UFO Lesson 4 - Counting Collectables and Displaying Score
-
Open PlayerController script in Visual Studio
-
Uncomment countText and winText public variables.

-
Uncomment setting of winText.text property to an empty string at the start of the game, line 26.

-
Uncomment Set Count Text method.

-
Uncomment calling of the SetCountText method in the Start method and the OnTriggerEnter2D method , line 61.


-
Switch to Unity. Add a new Text Game Object to the Canvas and rename it to CountText


-
Add a new Text Game Object to the Canvas and rename it to WinText

-
Update Player Controller Script properties with CountText and WinText game objects.

Attachments:
image2017-8-27_7-58-11.png (image/png)
image2017-8-27_7-58-23.png (image/png)
image2017-8-27_7-58-34.png (image/png)
image2017-8-27_7-58-48.png (image/png)
image2017-8-27_7-58-58.png (image/png)
image2017-8-27_7-59-33.png (image/png)
image2017-8-27_7-59-42.png (image/png)
image2017-8-27_7-59-53.png (image/png)
image2017-8-27_8-0-27.png (image/png)