-
Notifications
You must be signed in to change notification settings - Fork 0
/
InputMgr.h
72 lines (52 loc) · 1.28 KB
/
InputMgr.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
#ifndef SYSInputMgr
#define SYSInputMgr
#include <OgreRoot.h>
#include <OISEvents.h>
#include <OISInputManager.h>
#include <OISKeyboard.h>
#include <OISMouse.h>
#include <SdkTrays.h>
#include <SdkCameraMan.h>
#include "Semaphore.h"
#include "ControllerAbstract.h"
#include <string>
using namespace std;
class InputMgr : public OIS::KeyListener, public OIS::MouseListener, OgreBites::SdkTrayListener
{
public:
//virtual ~InputMgr(void);
static InputMgr* getInstance();
// OIS::KeyListener
bool keyPressed( const OIS::KeyEvent& evt );
bool keyReleased( const OIS::KeyEvent& evt );
// OIS::MouseListener
bool mouseMoved( const OIS::MouseEvent& evt );
bool mousePressed( const OIS::MouseEvent& evt, OIS::MouseButtonID id );
bool mouseReleased( const OIS::MouseEvent& evt, OIS::MouseButtonID id );
Semaphore* getSemaphore()
{
return this->semaphore;
}
InputMgr* setSemaphore(Semaphore* semaphore)
{
this->semaphore = semaphore;
return this;
}
ControllerAbstract* getControllerPtr()
{
return this->controllerPtr;
}
InputMgr* setControllerPtr(ControllerAbstract* controllerPtr)
{
this->controllerPtr = controllerPtr;
return this;
}
private:
InputMgr();
/**
* requisitos da classe
*/
Semaphore* semaphore;
ControllerAbstract* controllerPtr;
};
#endif