-
Notifications
You must be signed in to change notification settings - Fork 2
/
World.h
37 lines (27 loc) · 983 Bytes
/
World.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "Game.h"
#include "Object.h"
#include "AirplaneState.h"
class Target;
class Enemy;
class Airplane;
class World : public Object {
Airplane * player;
Target * target;
std::vector<Enemy *> enemies;
public:
World(Game *);
~World();
Airplane * addPlayer(const AirplaneState& airplaneState);
Target * addTarget(const Ogre::Vector3& position);
Enemy * addEnemy(const AirplaneState& airplaneState, const Ogre::String& name);
void update(float);
Ogre::SceneNode * getRootNode();
const Ogre::SceneNode * getRootNode() const;
Airplane * getPlayer() { return player; }
const Airplane * getPlayer() const { return player; }
Target * getTarget() { return target; }
const Target * getTarget() const { return target; }
static const Ogre::String GROUND_NODE_NAME;
private:
Ogre::SceneNode * newNode(const Ogre::Vector3& position, const Ogre::Quaternion& orientation, const Ogre::String& name);
};