Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 31, 2005, 12:43:58 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: prepeared to implement all system wide commands

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/loading/game_loader.cc

    r4324 r4410  
    2626#include "resource_manager.h"
    2727#include "factory.h"
     28#include "event.h"
     29#include "event_handler.h"
    2830
    2931#include <string.h>
     
    256258
    257259
     260void 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
    258292/*
    259293  \brief this changes to the next level
Note: See TracChangeset for help on using the changeset viewer.