COIN GAME
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDMFFj_V-IZxZr_9YeS0BCku18gpeMKrbEqQ6dCmPD8fsYVur_4hoP7DkJQmpzzG6bzXvLI-hh9Je-ZBlPy9DMr85A4P0faCrPBpbGZ6u9l31ynplkS7QQPP8m49rhrARNIRFN_w3uZ0k/w640-h518/title+pic.png)
In the previous lessons, we have learned how to add, move, and rotate an object in Unity. We will now apply these concepts to create a simple game; COIN COUNTER GAME. We need to import assets such as a ball (player), coin, robber (antagonist/challenge). After import, place the assets as shown. Note that the robber's initial position must be out of the main scene. ADDING SCORE TEXT We want to display the players score in the game. In order to do that, we go to the Scene Panel , right click, select UI , and finally select Text . A scene will be created named Canvas. Click Text under it, and from the Inspector Panel, write Score: as the text. Also, align the text in the upper center position of the canvas. ADDING COMPONENTS FOR EACH ASSET For the Score Text, we will add a script component containing the following code: Make sure to add UnityEngine.UI library in your code since we are using a UI Component in the scene. For the ball, we will add a script component for its controls -