Thursday 18 February 2021

Unity Tutorial 03

 Unity Tutorial( Collectibles & Damage Zones)

In this weeks unity tutorials we were adding to the game, after doing this weeks unity tasks I realized how some parts of games I actually play work. So in these tutorials we were adding things like strawberries, for example. This weeks first tutorial was called collectibles, so we had to put things in place to for the character, this being Ruby to collect as she makes her way through the map. The main goal for this tutorial was to add to Ruby's health within the game. So the first thing we had to do was add a health stat to Ruby, most of the beginning of this tutorial was done using visual studio adding code to make the health stats appear in the game.

So by the end of this when ruby walked into a strawberry, her health went up by 1 out of 5, and each time she walked through the fruit her health improved. At the beginning of damage zones and enemies we had to reset Ruby's health to start at 1.Then we had to add the damage zone, this is where Ruby walks and she will get injured leading to a decrease in health in the game. We did this by making changes in the sprite renderer, scaling the game Object and a 2D Box Collider.


Image source: Unity Screenshot

Then we had to add the enemy into the game, to do this you had to download the png file from unity and import it into the game and convert it to a sprite. You don't add any movement to the enemy until next weeks tutorials.
 

No comments:

Post a Comment

Reading 10-"Doing"

 "Reading week 10" For this week reading task we had to work on the e-book or digital book the entire year group is working togeth...