Exercises
To help you test your knowledge of this chapter's content, here are a few exercises that you should work on. They are not imperative to the rest of the book, but working on them will help you assess your strengths and weaknesses in the material covered:
- Move the game input from a fixed,
staticclass to a component. - Split
SpriteComponentinto two individual components; one that provides a static sprite, and one that provides an animated sprite. - Create a
componentthat encapsulates a certain behavior and use it in your game.