Unity Tutorial 09

 Intro 

From What I understand from the introduction we're going to be using all the elements we have done before or at least most of them, but adding in UI elements that weren't present in the past unity tutorials. 

Clicky mouse 

We are asked to pick objects to shoot in the air, In the package we downloaded we have things like pizza,ved,fruit,balls and cans. These iteams are giving 3 randomized variables theses are... 

  • Position 

  • Force 

  • Rotation 

We do this by using the method Random.range() to aply theses randomizations.  

 

Unity actually has these build in methods for the use of a mouse. That lets you know when the mouse has been released, is clicked or has entered an spiffed area. These are … 

  • OnMouseEnter()    (area) 

  • OnMouseDown()    (Clicked) 

  • OnMouseUp()          (released) 

 

We then had to make good objects and bad objects. These objects in give take take from the players score.They will both need rigid bodys and box colliders to do this. I ended up using a 2d collider in this and I ran into a lot of problems down the line and had no idea why. Ensure that the collider is in line with the object it is set to because that was also a mistake I made. I was shooting the item, yet nothing happened. 

 

 

Then I wrote a script in order to make the item come from a random location.(paid to all items) In this script in also had the other values for movement like how Hight it would fly up in the air and how much is would rotate using the values from before. We were ment to clean up our code next but well. I didn't this didn’t help when I ran into problems 

. 

 

I then wrote more scripts for things like  Destruction animations ect. 

 

Keeping score. 

Keeping score was very straight forward and although I had elements that I didn’t know how to get rid of or fix I felt in wasn’t that important to fix as I didn’t really effect gameplay. 

We did things like set up the score board and set up new partial's for death animations(of objects) 

In the time I had for this week to Compleat and upload this blog I currently am still working on the next part and hope to update the blog so show progression  

Thank for reading. 

Comments

Popular posts from this blog

Unity Tutorial 08

Week 9 Reading and Writing