2 #include "usereventtype.h"
4 Controle::Controle(Player
&p
) : jogador( p
) {
8 void Controle::handleEvents() {
10 while( SDL_PollEvent( &e
) ) {
13 switch (e
.user
.code
) {
15 void (*p
) (void*) = (void (*)(void*))e
.user
.data1
;
19 default: handleEvent(e
); break;
26 switch (e
.key
.keysym
.sym
) {
28 jogador
.game
->reloadLua();
31 jogador
.setPosition(jogador
.game
->getSpawn().x
,jogador
.game
->getSpawn().y
);
33 default: handleEvent(e
);break;