Summary

In this chapter, we reviewed a pattern that offers a game programmer a flexible way to implement an often requested feature – weapon customization. It appears that the Decorator pattern was perfectly designed to accomplish this type of task. But, as you can imagine, the Decorator can be used to implement all kinds of customizable systems and features, such as the following:

  • Vehicle upgrades
  • Armour and clothing

In the next chapter, we will transition out of Behavioral patterns and will instead focus on Decouplers, starting with the Event Bus.

Get Hands-On Game Development Patterns with Unity 2019 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.