Chapter 19: Listening with the Observer Pattern, Multitouch, and Building a Particle System
In this chapter, we will get to code and use our first design pattern. The Observer pattern is exactly what it sounds like. We will code some classes that will indeed observe another class. We will use this pattern to allow the GameEngine class to inform other classes when they need to handle user input. This way, individual classes can handle different aspects of user input.
In addition, we will code a particle system. A particle system comprises hundreds or even thousands of graphical objects that are used to create a visual effect. Our particle system will look like an explosion.
Here is a summary of the topics that will be covered in this chapter: ...
Get Learning Java by Building Android Games - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.