Creates an Game object that inherits State and runs the Game. More...
#include <Game.h>


Public Member Functions | |
| Game (JAM_StateManager *stateManager, SDL_Renderer *renderer, int screenWidth, int screenHeight) | |
| ~Game () | |
| bool | input () |
| void | update (float dt) |
| void | draw () |
Public Member Functions inherited from JAM_State | |
| JAM_State (JAM_StateManager *stateManager, SDL_Renderer *renderer, int screenWidth, int screenHeight) | |
| virtual | ~JAM_State () |
Private Member Functions | |
| bool | windowsInput (SDL_Event &incomingEvent) |
| bool | androidInput (SDL_Event &incomingEvent) |
Private Attributes | |
| std::vector< std::vector < MapSquare * > > | mapSquares |
| JAM_Audio * | music |
| JAM_Vec2 | mouse |
| JAM_Vec2 | target |
| int | squareScale |
| JAM_Texture * | border |
| JAM_Texture * | targetTexture |
| JAM_Texture * | wall |
| JAM_Button * | toggle |
| int | placementType |
| JAM_AStar * | aStar |
| Robot * | robot |
Additional Inherited Members | |
Protected Attributes inherited from JAM_State | |
| JAM_StateManager * | stateManager |
| SDL_Renderer * | renderer |
| int | screenWidth |
| int | screenHeight |
| Game::Game | ( | JAM_StateManager * | stateManager, |
| SDL_Renderer * | renderer, | ||
| int | screenWidth, | ||
| int | screenHeight | ||
| ) |
Constructs the Game object.
| stateManager | A pointer to the StateManager. |
| renderer | A pointer to the renderer. |
| screenWidth | The screen width. |
| screenHeight | The screen height. |

| Game::~Game | ( | ) |
|
private |
|
virtual |
|
virtual |
|
virtual |
|
private |
|
private |
The AStar path-finding.
|
private |
The texture for the border.
|
private |
The mouse position.
|
private |
A pointer to the background music.
|
private |
The type of object to place. (1 = target, -1 = wall)
|
private |
The size of the squares.
|
private |
The target index.
|
private |
The texture for the target.
|
private |
The button to toggle placement.
|
private |
The texture for the walls.
1.8.8