Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 31, 2011, 5:34:18 PM (13 years ago)
Author:
rgrieder
Message:

Added "getTimeFactor" console command.

Location:
code/branches/presentation/src/orxonox/gamestates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/gamestates/GSRoot.cc

    r8327 r8692  
    4545
    4646    static const std::string __CC_setTimeFactor_name = "setTimeFactor";
     47    static const std::string __CC_getTimeFactor_name = "getTimeFactor";
    4748    static const std::string __CC_setPause_name = "setPause";
    4849    static const std::string __CC_pause_name = "pause";
     
    5253    SetConsoleCommand("printObjects", &GSRoot::printObjects).hide();
    5354    SetConsoleCommand(__CC_setTimeFactor_name, &GSRoot::setTimeFactor).accessLevel(AccessLevel::Master).defaultValues(1.0);
     55    SetConsoleCommand(__CC_getTimeFactor_name, &GSRoot::getTimeFactor).accessLevel(AccessLevel::Master);
    5456    SetConsoleCommand(__CC_setPause_name,      &GSRoot::setPause     ).accessLevel(AccessLevel::Master).hide();
    5557    SetConsoleCommand(__CC_pause_name,         &GSRoot::pause        ).accessLevel(AccessLevel::Master);
     
    8991
    9092        ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(this);
     93        ModifyConsoleCommand(__CC_getTimeFactor_name).setObject(this);
    9194        ModifyConsoleCommand(__CC_setPause_name).setObject(this);
    9295        ModifyConsoleCommand(__CC_pause_name).setObject(this);
     
    9699    {
    97100        ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(0);
     101        ModifyConsoleCommand(__CC_getTimeFactor_name).setObject(0);
    98102        ModifyConsoleCommand(__CC_setPause_name).setObject(0);
    99103        ModifyConsoleCommand(__CC_pause_name).setObject(0);
     
    151155                this->timeFactorPauseBackup_ = factor;
    152156        }
     157    }
     158
     159    float GSRoot::getTimeFactor()
     160    {
     161        return TimeFactorListener::getTimeFactor();
    153162    }
    154163
  • code/branches/presentation/src/orxonox/gamestates/GSRoot.h

    r8079 r8692  
    5454        void pause();
    5555
     56        float getTimeFactor();
     57
    5658        static void delayedStartMainMenu(void);
    5759
Note: See TracChangeset for help on using the changeset viewer.