What I Did:
Today I have started the next tutorial segment on the unity site showing how to pick up the pick up game object. The first the I did was recheck the active box under the players transform so its visible again. I then reopened the player controller script to edit it. Within the code I added code to call on a tag to deactivate the pick up game object when the player and a pick up collide. I then created a tag to the prefab "Pick Ups" called pick up and since its a prefab it was applied to all the pick up objects in the game. However since the unity physics don't allow the two object to overlap the player still bounced of the pick up objects, so I had to check the prefabs trigger option so that it acts as a trigger and allows the player to pass through and collect it.
Moving on to the next tutorial I will be adding a ui to show the score, display text and end the game. First I reopened the player controller script and added a variable count. Then had it so that whenever an object was picked up it would add 1 to the previous count total. I then created a new ui from the hierarchy create section and selected text. I the switched the text colour to white so its easier to see and anchored it to the top left of the screen so it wasn't in the middle. I then went to player controller script again and added the new variable, however the slot to reference the ui under the controller script was not appearing.
What I Learned:
I how to add triggers and how to essentially make a collectible game object. I also learned a bit on how to display text or a ui on the game screen.
What I'm Doing Next Day:
Next day I'll be fixing the error i have currently run into and finishing up this tutorial that will display the score. I Expect to be finished with this tutorial in the next day or two and will be able to move onto the next project/tutorial.
No comments:
Post a Comment