Castle Battle  1.0
gamemanager.h
Go to the documentation of this file.
1 #include <irrlicht.h>
2 #include "physics.h"
3 #include "hud.h"
4 #include "player.h"
5 #include "keyboard.h"
6 #include "Logger.h"
7 using namespace irr;
12  private:
13  scene::ISceneManager* smgr;
14  video::IVideoDriver* driver;
15  IrrlichtDevice* device;
18  Player* players[2];
20  bool turn;
22  core::vector3df worldPosition;
28  core::stringw* names;
30  void initKeyboard();
31  public:
33  bool stop;
45  scene::ISceneManager* smgr,
46  video::IVideoDriver* driver,
47  IrrlichtDevice* device,
48  core::vector3df worldPosition,
49  Physics* physics,
50  core::stringw* names = 0);
51 
52  ~GameManager();
54  void initGamePlay(core::stringw* names = 0);
61  bool loop();
63  int getWinner();
65  core::stringw* getNames();
66 
67 
68 };
video::IVideoDriver * driver
Definition: gamemanager.h:14
Physics * physics
Definition: gamemanager.h:16
IrrlichtDevice * device
Definition: gamemanager.h:15
HUD::HUD * hud
HUD of the gameplay.
Definition: gamemanager.h:24
scene::ISceneManager * smgr
Definition: gamemanager.h:13
Physics class will handle all things related to collisions, creating Bullet physics objects and the p...
Definition: physics.h:12
HUD of the gameplay.
Definition: hud.h:19
bool stop
If someone win, stop is set to true.
Definition: gamemanager.h:33
core::stringw * names
Player names.
Definition: gamemanager.h:28
bool turn
Turn to play: true: first player, false second player.
Definition: gamemanager.h:20
Keyboard class will handle keyboard input events.
Definition: keyboard.h:48
GameManager is the main manager of the gameplay.
Definition: gamemanager.h:11
Keyboard keyboard
The keyboard map of each players.
Definition: gamemanager.h:26
core::vector3df worldPosition
World initial position, by default is setted to Terrain center.
Definition: gamemanager.h:22
Player handles everthing about player-releated context, that means Castle, Cannon, Target, Ball, Camera.
Definition: player.h:31