Tutorial 06

 So this week's unity tutorial was the second last tutorial I have to complete for this semester and for Ruby's Adventure. This week I worked on styling the user interface and the Dialog for one of the characters.

For the first part of the tutorial, I customised the user interface specifically the health bar for Ruby. To create this I had to first create a canvas. I then added an image to that canvas and that was the frame for the health bar. I then resized the image and assigned it to the top left corner using anchors. I then added an image of Ruby to the frame and made the whole thing resizable using the Rect Transform Component. So therefore when I resize my game window, the whole frame stays the same. I also added a mask for the actual health bar itself and did some coding so therefore when Ruby runs into the spikes or the robots she loses health but if she collects the strawberries she gains health.

For the second part of the tutorial, I created a new character named Jambi. I had to slice the Jambi sheet and add the sprites to the game as an animation. I did some raycasting in my c# script so Ruby can interact with Jambi when a certain button is pressed (in this case X). When that button is pressed, a dialogue box appears above Jambl the frog. To create the dialog box, I had to go through the same process as creating the health frame and that is by creating a canvas and adding an image to that canvas. I added text to that dialogue box and did some coding to only let it appear for a certain amount of time when Ruby is facing Jambl and X is pressed.

I really liked this tutorial because I got to add a health bar which loads of games have so it was good to know how they were made and the same with dialogue boxes. One thing I found difficult was slicing Jambl into sprites as I could not get that working for some reason. I sliced him up into more pieces than I needed but only used the characters I needed. 

This is what my game looks like after this week's tutorial.


Comments

Popular Posts