Changeset 5553 in orxonox.OLD for trunk/src/util/loading
- Timestamp:
- Nov 12, 2005, 1:58:30 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/loading/game_loader.cc
r5300 r5553 89 89 this->eventHandler = EventHandler::getInstance(); 90 90 this->eventHandler->subscribe(this, ES_GAME, KeyMapper::PEV_PAUSE); 91 this->eventHandler->subscribe(this, ES_ALL, EV_MAIN_QUIT); //< External Quit Event 91 92 this->eventHandler->subscribe(this, ES_ALL, KeyMapper::PEV_QUIT); 92 93 this->eventHandler->subscribe(this, ES_GAME, KeyMapper::PEV_NEXT_WORLD); … … 274 275 * handle keyboard commands 275 276 * @param event the event to handle 276 */277 */ 277 278 void GameLoader::process(const Event& event) 278 279 { 279 280 if( event.type == KeyMapper::PEV_NEXT_WORLD) 280 281 282 283 284 285 281 { 282 if( likely(event.bPressed)) 283 { 284 this->nextLevel(); 285 } 286 } 286 287 else if( event.type == KeyMapper::PEV_PREVIOUS_WORLD) 287 288 289 290 291 292 288 { 289 if( likely(event.bPressed)) 290 { 291 this->previousLevel(); 292 } 293 } 293 294 else if( event.type == KeyMapper::PEV_PAUSE) 294 295 296 297 298 299 300 301 302 295 { 296 if( likely(event.bPressed)) 297 { 298 if(this->isPaused) 299 this->resume(); 300 else 301 this->pause(); 302 } 303 } 303 304 else if( event.type == KeyMapper::PEV_QUIT) 304 { 305 if( event.bPressed) this->stop(); 306 } 305 { 306 if( event.bPressed) this->stop(); 307 } 308 else if (event.type == EV_MAIN_QUIT) 309 this->stop(); 307 310 } 308 311
Note: See TracChangeset
for help on using the changeset viewer.