Game Development Reference
In-Depth Information
For this reason, their implementation specifics need not be examined here, because creating them
follows the same basic process in which the Cash Power-Up was created. The classes are, however,
included in the topic companion project files, should you wish to explore them and examine their
source code further. Specifically, the classes are Powerup_Ammo (ammo restore), Powerup_Burger
(health restore), and Powerup_Weapon (weapon upgrade). More information on these power-ups can
be found in Chapter 1, including Figures 1-5, 1-6, 1-7, and 1-8.
Conclusion
This chapter was primarily dedicated to creating a Cash Power-Up object, and in so doing, we've
seen a lot of critical C# and scripting concepts. There's a lot more work going on with our power-
ups than there might seem at first glance. Once you open them and explore their innards, we see
they rely on physics, colliders, events, singletons, deltaTime, coroutines, and a host of other Unity
conventions. Having reached this far, however, we're now in a strong position to begin development
of the Player character. This is considered in the next chapter. At this stage, you should be able to do
the following:
Create C#-based power-ups for your own projects
Understand what Billboards are and how they work
Understand coroutines and yield statements
Use deltaTime to create frame-rate independent motion and animation
Apply basic vector arithmetic and quaternion rotation
Use the Unity Time class
Understand the Singleton design pattern
Create Singleton objects using static members
Understand how the Unity RequiresComponent works
Integrate NotificationsManager into your own games via Singletons
Make Prefabs for your scenes
 
Search WWH ::




Custom Search