Posts

Showing posts with the label Week 5

Tutorial 2

Image
 Tutorial 2.1 In this tutorial I was tasked with creating a game where the character could fire projectiles at animals. To begin a created a new Unity project which I called Prototype 2. Then downloaded the assets from the unity store. After that I then dragged the 3 animals and the farmer and the piece of food into the hierarchy and adjusted their position and scale accordingly. Then I created a C# script folder in the assets folder, which I named PlayerController and attached the script to the farmer, which I renamed player. I then opened up the script and added a few lines of code. Then I set the speed that the player could travel and allowed him to travel from side to side. Then I made it so that the player had to stay in between a set limit which kept him from leaving the screen. After that I then decide that I should clean up some of the code by first replacing the hardcoded values with a variable called xRange, what this meant was that for whenever a specific value is wanted...