forked from imoital/CastleBlast
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathController.cpp
More file actions
43 lines (35 loc) · 724 Bytes
/
Controller.cpp
File metadata and controls
43 lines (35 loc) · 724 Bytes
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
#include "Controller.h"
namespace CastleBlast {
Controller::Controller(void) : cg::Entity("Controller")
{
}
Controller::~Controller(void)
{
}
void Controller::init()
{
_F2Pressed = false;
}
void Controller::onKeyPressed(unsigned char key)
{
if (key == 27) {
cg::Manager::instance()->shutdownApp();
}
}
void Controller::onKeyReleased(unsigned char key)
{
if (key == '2') {
std::cout << "active debug" << std::endl;
DebugManager *debugManager = (DebugManager*) cg::Registry::instance()->get("DEBUG_MANAGER");
if (debugManager) {
debugManager->debugToggle();
}
}
}
void Controller::onSpecialKeyPressed(int key)
{
}
void Controller::onSpecialKeyReleased(int key)
{
}
}