Castle Battle  1.0
player.h
Go to the documentation of this file.
1 #ifndef PLAYER_H
2 #define PLAYER_H
3 #include <irrlicht.h>
4 #include "keyboard.h"
5 #include "ball.h"
6 #include "target.h"
7 #include "camera.h"
8 #include "hud.h"
9 #include "castle.h"
10 #include "cannon.h"
11 using namespace irr;
12 using namespace KEYBOARD;
17  HUMAN=0,
19  };
26  };
31 class Player{
32  private:
33  scene::ISceneManager* smgr;
34  video::IVideoDriver* driver;
35  irr::IrrlichtDevice* device;
45  public:
49  core::stringw name;
62  Player(IrrlichtDevice* device,scene::ISceneManager* smgr, video::IVideoDriver* driver, core::vector3df position, Physics* physics, Keyboard* keyboard, PLAYER_TYPE type, PLAYER_POSITION side = STRAIGHT);
63  ~Player();
65  scene::IMeshSceneNode* getNode();
69  core::vector3df getCannonRange();
71  void focusCamera();
73  void setCannon();
83  bool loop(HUD::HUD* hud);
85  void reset();
90  bool checkTarget();
91 
92 
93 
94 
95 };
96 #endif
Definition: player.h:17
irr::IrrlichtDevice * device
Definition: player.h:35
Cannon handles the cannon object.
Definition: cannon.h:17
The Castle handles all things related to the Castles Building, treasure, physics and collisions...
Definition: castle.h:16
PLAYER_POSITION side
Side of the player PLAYER_POSITION.
Definition: player.h:44
PLAYER_TYPE type
Type of player PLAYER_TYPE.
Definition: player.h:51
PLAYER_TYPE
Enum PlAYER_TYPE: HUMAN or AI.
Definition: player.h:16
Physics class will handle all things related to collisions, creating Bullet physics objects and the p...
Definition: physics.h:12
Keyboard namespace with all things related to Keyboard, Key, and keyboard mapping.
Definition: keyboard.h:8
Cannon * cannon
Cannon of the player.
Definition: player.h:42
Physics * physics
Definition: player.h:38
HUD of the gameplay.
Definition: hud.h:19
Keyboard * keyboard
Keyboard of the player.
Definition: player.h:47
Castle * castle
Castle of the player.
Definition: player.h:40
core::stringw name
Name of the player.
Definition: player.h:49
Camera * camera
Main camera of the player.
Definition: player.h:37
Keyboard class will handle keyboard input events.
Definition: keyboard.h:48
Definition: player.h:18
Camera based on ICameraSceneNode of Irrlicht.
Definition: camera.h:6
Definition: player.h:25
PLAYER_POSITION
Enum PLAYER_POSITION, is the position rotation: STRAIGHT or OPPOSITE It is used to set the rotation o...
Definition: player.h:23
Player handles everthing about player-releated context, that means Castle, Cannon, Target, Ball, Camera.
Definition: player.h:31
video::IVideoDriver * driver
Definition: player.h:34
scene::ISceneManager * smgr
Definition: player.h:33
Definition: player.h:24