Summary

In this chapter, we have explored what Prefabs are in Unity, how they are used, and more importantly, how to create one. We have also learned the basics of C# and scripts within Unity.

In addition, this chapter has also shown us how to create PlayerControllers and how to implement a collection system so that our Angel can eat cakes. Overall for the player movement, we have created a script, the PlayerController, which is responsible for taking the input and moving the character. Then, for the collecting system, we have created another script, this time attached to the cakes, which is responsible for detecting when the player collects that specific cake. This system is incomplete since we don't count how many cakes the player collects, and therefore the game never ends even if the player collects all the cake in the map. We will fix this in the next chapter, where we will talk about UI, giving feedback to the player, and ultimately establishing game over conditions. Then, we created the player character, an Angel able to collect cakes. To do so, we used the Physics Engine, by using the Colliders and Rigidibodies. Lastly, we added some background music and sound FX to our game to give it a little more magic. In Chapter 4, It's about U and I, we're going to explore the concept of User Interfaces (UIs), what they are, how to design them, and how to create them in Unity! So, things are about to get a bit more serious between U and I…and Unity.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset