Tuesday, September 29, 2020

Activity # 4

 Activity # 4: 

John Lloyd B. Galvante

John Christian Caraga

BS-EMC 2A, INTRO TO GAMING DESIGN AND DEVELOPMENT

In this blog, we will show you how to create a coin counter using UNITY and use of UI and its components.

We start by doing the text script for coin counter and score board.


Here in the hierarchy we can see the canvas, in order to create a text right click in the hierarchy then > UI > Text therefore the Score Text is made. You can add another hierarchy to the Score text the image, click on the Score text then UI > Image.

Here is the Inspector tool for the Image, if you want to add an Image to the Coin or Score text counter. Simply drag an Image you want to add in the [Source Image].


This is what It will look like when you add an Image to the Score text.


Phase 1: How to increase and decrease a coin in your Unity game?

In the main camera, when you drag the coin in the scene it will also be added to the hierarchy, to simply increase and decrease the coin,


The script for the coins will be:


The components used to make the game, for player, coins and scoreboard.

For player:


For coins:


For Scoreboard:


What is U.I?

Unity UI is a UI toolkit for developing user interfaces for games and applications. It is a Game Object-based UI system that uses Components and the Game View to arrange, position, and style user interfaces. ​ You cannot use Unity UI to create or change user interfaces in the Unity Editor.

The script used in the making of the Activity 4:









No comments:

Post a Comment

Activity 6

 Activity 6:  How to move a player? while shoot and point GROUPINGS: John Lloyd B. Galvante, John Christian Caraga December 14, 2020 In this...