Making the game
By the end of this section, we will have a playable game. In this section, we will add code to the GameScreen
class to bring together everything we have been coding over the last three chapters. To get started, add an instance of PhysicsEngineGameMode
to GameScreen.h
by adding an extra include directive, as follows:
#include "PhysicsEnginePlayMode.h"
Then, declare an instance, as highlighted in the following code:
private:     ScreenManagerRemoteControl* m_ScreenManagerRemoteControl;     shared_ptr<GameInputHandler> m_GIH;     PhysicsEnginePlayMode m_PhysicsEnginePlayMode; … …
Now, open the GameScreen.cpp
file, add some extra include directives, and forward-declare the BulletSpawner
class, as highlighted in the following code:
#include "GameScreen.h" #include "GameUIPanel.h" #include "GameInputHandler.h" #include "GameOverUIPanel...