-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPlayState.h
101 lines (68 loc) · 1.77 KB
/
PlayState.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
/*
* PlayState.h
* Prototyp
*
* Created by Christian Pehle on 26.08.09.
* Copyright 2009 Universität Heidelberg. All rights reserved.
*
*/
#ifndef PlayState_H
#define PlayState_H
#include "RTSCamera.h"
#include "GameState.h"
#include "Trays.h"
//#include "PauseState.h"
namespace Orbifold {
class Game;
class PlayState : public GameState, public SdkTrayListener {
public:
void enter();
void exit();
void initialise();
void shutdown();
// Update
void update();
static PlayState* getSingleton();
//
bool keyPressed(const OIS::KeyEvent &evt);
bool keyReleased(const OIS::KeyEvent &evt);
bool mouseMoved(const OIS::MouseEvent &evt);
bool mousePressed(const OIS::MouseEvent &evt, OIS::MouseButtonID id);
bool mouseReleased(const OIS::MouseEvent &evt, OIS::MouseButtonID id);
//
void windowResized(Ogre::RenderWindow* rw);
void windowMoved(Ogre::RenderWindow* rw);
bool windowClosing(Ogre::RenderWindow* rw);
void windowClosed(Ogre::RenderWindow* rw);
void windowFocusChange(Ogre::RenderWindow* rw);
protected:
static PlayState* instance;
void save();
void restore();
Ogre::Root *ogre;
Ogre::RenderWindow *window;
Ogre::SceneManager *scene;
RTSCamera *camera;
SdkTrayManager* tray;
Ogre::Timer* timer;
bool contentSetup;
bool resourcesLoaded;
void initialiseView();
void setupView();
void setupContent();
void cleanupContent();
void initialiseContent();
void locateResources();
void loadResources();
void unloadResources();
void createSceneManager();
//void createOverlays();
//void hideOverlays();
//Ogre::Camera* createCamera(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* window);
private:
bool initialised;
PlayState();
~PlayState();
};
}
#endif