Thursday 5 March 2020

Unity Tutorial 05


Unity Tutorial 05


In this weeks Unity tutorial we made more improvements to our animal defence game. The first thing that we did was instead of using the button S to spawn in animals, we now want the animals to spawn in automatically in timed intervals. We done this by rewriting some code and use the InvokeRepeat command.

Next we added the collider components to our animals. We need to set the box collider as a trigger for the animals and the projectiles so that we can make them both disapear when they collide with each other. By using the OnTriggerEnter command we will destroy the 2 game objects when they collide. 

Lastly we will edit our destroy if out of bounds script so that a Game Over messege will display if one of the animals makes it out of bounds. 

For the second tutorial I found it a bit more of a challenge. The aim of the tutorial was to use the same methods as the previous tutorial to complete the tasks but I found it alot harder because there was less help. i think that this was a good idea though because it makes us think for ourselves instead of copying the tutorial. 

Image info: screenshot from unity tutorial

No comments:

Post a Comment

Unity Tutorial 06