Skip to main content

UNITY TUTORIAL 06

In this weeks tutorials I learned how to add UI to my game to show Ruby's health status using images. I created a canvas in my hierarchy then created an image as a child gameobject. I added the health bar background image into the image gameobject's source image. I clicked the 'set native setting'' button so the image would transform into its original size. The image became very big so I resized it to fit into the top left corner of the game scene. I chose the anchor preset in the rect transform section of the inspector so that the anchor would reposition into the top left corner. This makes sure that the UI stays in that corner at al times. 

I created a child object to the health bar image and added a Ruby portrait into the source image, then resized it to fit into the circle. I made another child object of the health bar background and called it mask, resized the white box, and adjusted the anchors to each of its corners. I added the blue health bar image and resized it, then applied a mask component and unchecked 'show mask graphic' so that the white box would become hidden. I edited the code so that the bar would reduce when Ruby takes damage. 

I added a new character called Jambi as an npc and edited its code so Ruby is able to interact with them. I gave Jambi a dialog box and applied some text that they would say. I then adjusted the code so that the dialog box would appear when Ruby interacts with Jambi.  

Screenshot of my work in Unity.

Comments

Popular posts from this blog

UNITY TUTORIAL 04

Various devices illustration from Freepik . This week I completed the final set of tutorials to create a simple animal feeding game. I learned how to make animals spawn on their own rather than having to click "S" to do so. This involved creating a custom function and moving the if-statement under "void Update" to this new function. I also learned how to make the animals spawn after a certain timeframe. I learned how to add box colliders to the animals and how to edit the size of these box colliders. Moreover, I was taught how to make the animals and pizza disappear when they came in contact with each other. I added an else-if-statement that triggers a "Game Over" message when an animal surpasses the player without being fed.  Following this, I completed a challenge in which I had to correct a game similar to the one in the previous tutorials. The final product should allow the player to spawn dogs to catch falling coloured balls. The dogs were initially a...

INTRODUCTION TO SOMEONE WHO'S JUST VIBING

HEY!! Look who made it to her second year of college!! Me, Nadine, I did!! Yeah, I'm even more surprised than you are.  Happy girl illustration by 94MLK_ on Twitter. Saved from Pinterest . Last year wasn't too bad, but that was up until the whole country went into quarantine and I began to fear for my college career. I was constantly on the verge of giving up on my assignments but I would like to thank my friends for not allowing that to happen. I'm so glad I get to start year two with them and hopefully we'll make it to the end together too!  Despite the stress, there are a few pieces of work from year one that I'm proud of. I liked the websites that I created for Web Development 1 and 2, the video I edited from Introduction to Digital Media mission 3 and the advertisement poster I made for Digital Photography. I hope to produce better work this year.  Personal screenshot from the index page of my web development 1 project. Personal screenshot from the index page ...