Thursday, October 24, 2019

My First Game Design: Unity Tutorial 04

Image from DeviantArt 

This week we went back to using the video tutorials from Jimmy Vegas with three more videos to watch.

The last video we watched went over how to create a cursor so that the player could see where their character was looking at all times and in this video we are shown how to put text instructions for the player underneath the cursor for a period of time. These instructions tell the player what button to press to perform an action. We are also shown how to place a little extra flare to the original cursor by putting rectangles around it on each side to form a box around the cursor.

These elements are then turned off so that they're not being displayed all the time before creating a C# script to make the text and extra cursor appear when the cursor hovers over the gem and make it so that when the button is pressed the gem is collected and a sound is played to let the player know they collected the gem.

In the second video tutorial he shows us how to add more things into the environment wich was explained to us in the first few tutorials we watched weeks ago. The rest of the video is dedicated to adding a weapon to the game and animating it, teaching us the basics of animating in Unity. But before we get into animating the weapon we must first contain the weapon within a cube to make the animation of the weapon swing look more realistic. The animation process in Unity is all about key frames and where you want your object to be on which frame.

The final video shows us how to create a C# script to make sure that the swinging animation doesn't just loop infinitely and to add a swinging sound to the weapon when the animation does play. The script makes it so that when the player presses the left mouse button the weapon swings and a swinging sound is played. This script can be used in the future if you choose to add more weapons to your game.





No comments:

Post a Comment