-
Notifications
You must be signed in to change notification settings - Fork 1
/
GameWorld.h
67 lines (51 loc) · 1.38 KB
/
GameWorld.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef GAMEWORLD_H
#define GAMEWORLD_H
#include <memory>
#include "GameState.h"
#include "Camera.h"
#include "Mesh.h"
#include "Skybox.h"
#include "Terrain.h"
#include "Knight.h"
#include "Dragon.h"
#include "Witch.h"
#include "Skele.h"
#include "3rd-party\xanimator\include\XAnimator_lib.h"
#include "Bridge.h"
#include "StaticMesh.h"
class GameWorld: public GameState
{
public:
GameWorld( );
~GameWorld( );
bool Init( );
void Enter( );
void Render( );
void Update( );
void Exit( GameState *nextState );
void ProcessMessages( UINT msg, WPARAM wParam, LPARAM lParam, void * Data );
D3DLIGHT9 worldLight;
D3DLIGHT9 spotLight;
D3DLIGHT9 pointLight;
Skybox skybox;
Terrain *terrain = 0;
Knight knight;
Dragon dragon;
Witch witch;
Skele skele;
Mesh moat;
Mesh castle;
ID3DXFont *font;
// for tree sprites
ID3DXSprite *sprite;
IDirect3DTexture9* treeTexture;
D3DXMATRIX t;
// The gameworld is a good place to hold the master reference to the .x model & animation library,
// since all models in the game world will probably need a reference to it
// We use a shared_ptr to manage the lifetime of the x model & animation library, to reduce confusion
// about who the owner of the library should be as there will be many references to it
std::shared_ptr<IXAnimator> XAnimator;
Bridge bridge;
StaticMesh p, m;
};
#endif