forked from manituan/Artificial-Intelligence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStateCity.h
104 lines (69 loc) · 2.53 KB
/
StateCity.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
//|||||||||||||||||||||||||||||||||||||||||||||||
#ifndef STATECITY_H
#define STATECITY_H
//|||||||||||||||||||||||||||||||||||||||||||||||
#include "AppState.h"
#include "DotSceneLoader.h"
#include "Camera.h"
#include "Light.h"
#include "InputKey.h"
#include "InputMouse.h"
#include <OgreInstancedEntity.h>
#include "FactoryEntity.h"
#include "EntityCityManager.h"
//|||||||||||||||||||||||||||||||||||||||||||||||
using namespace Ogre;
//|||||||||||||||||||||||||||||||||||||||||||||||
class StateCity : public AppState
{
public:
StateCity();
DECLARE_APPSTATE_CLASS(StateCity);
void enter();
void createScene();
void exit();
bool pause();
void resume();
bool getInput();
bool keyPressed(const OIS::KeyEvent &keyEventRef);
bool keyReleased(const OIS::KeyEvent &keyEventRef);
bool mouseMoved(const OIS::MouseEvent &arg);
bool mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id);
bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id);
bool onLeftPressed(const OIS::MouseEvent &evt);
bool itemSelected(OgreBites::SelectMenu* menu);
void update(double timeSinceLastFrame);
void buildGUI();
void wait (int seconds)
{
clock_t endwait;
endwait = clock () + seconds * CLOCKS_PER_SEC ;
while (clock() < endwait) {}
}
CameraSystem* getCameraSystem(){return m_pCamera;}
private:
CameraCity* m_pCamera;
Ogre::Camera* mCamera;
LightPoint* m_pLightP;
LightSpot* m_pLightS;
LightDir* m_pLightD_Left;
LightDir* m_pLight_Custom;
LightDir* m_pLightD_Front;
Ogre::ColourValue m_AmbientColor;
InputKey* m_pKey;
InputMouse* m_pMouse;
// Animation
AnimationState* m_pAnima;
std::vector<MovableObject*> m_vInstances;
std::vector<AnimationState*> m_vAnimations;
SceneNode* childNode;
std::vector<String> managerNames;
std::vector<InstanceManager*> vInstances;
std::vector<InstancedEntity*> vEnts;
std::vector<SceneNode*> vNodes;
std::vector<String> materialNames;
FactoryEntity* m_pFactory;
AISystem* m_pEntities;
};
#endif
//|||||||||||||||||||||||||||||||||||||||||||||||