Changeset 4410 in orxonox.OLD for orxonox/trunk/src/util/loading
- Timestamp:
- May 31, 2005, 12:43:58 AM (20 years ago)
- Location:
- orxonox/trunk/src/util/loading
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/loading/game_loader.cc
r4324 r4410 26 26 #include "resource_manager.h" 27 27 #include "factory.h" 28 #include "event.h" 29 #include "event_handler.h" 28 30 29 31 #include <string.h> … … 256 258 257 259 260 void GameLoader::process(const Event& event) 261 { 262 if( event.type == KeyMapper::PEV_NEXT_WORLD) 263 { 264 if( likely(event.bPressed)) 265 { 266 this->nextLevel(); 267 } 268 } 269 else if( event.type == KeyMapper::PEV_PREVIOUS_WORLD) 270 { 271 if( likely(event.bPressed)) 272 { 273 this->previousLevel(); 274 } 275 } 276 else if( event.type == KeyMapper::PEV_PAUSE) 277 { 278 if( likely(event.bPressed)) 279 { 280 if(this->isPaused) 281 this->resume(); 282 else 283 this->pause(); 284 } 285 } 286 else if( event.type == KeyMapper::PEV_QUIT) 287 { 288 if( event.bPressed) this->stop(); 289 } 290 } 291 258 292 /* 259 293 \brief this changes to the next level -
orxonox/trunk/src/util/loading/game_loader.h
r4262 r4410 10 10 #include "story_def.h" 11 11 #include "comincl.h" 12 #include "event_listener.h" 12 13 13 14 … … 22 23 class TiXmlElement; 23 24 class BaseObject; 25 class Event; 24 26 25 27 //! The GameLoader … … 35 37 world. this is done by callaing those StoryEntity::start() 36 38 */ 37 class GameLoader 39 class GameLoader : public EventListener 38 40 { 39 41 … … 58 60 BaseObject* fabricate( TiXmlElement* data); 59 61 62 void process(const Event &event); 63 60 64 private: 61 65 GameLoader ();
Note: See TracChangeset
for help on using the changeset viewer.