Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 28, 2009, 9:31:24 PM (15 years ago)
Author:
landauf
Message:

replaced most occurrences of setObject(o) in combination with createFunctor(f) with the more convenient createFunctor(f, o)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/modules/gamestates/GSRoot.cc

    r5799 r5829  
    6363        this->timeFactor_ = 1.0f;
    6464
    65         {
    66             // time factor console command
    67             FunctorMember<GSRoot>* functor = createFunctor(&GSRoot::setTimeFactor);
    68             functor->setObject(this);
    69             this->ccSetTimeFactor_ = createConsoleCommand(functor, "setTimeFactor");
    70             CommandExecutor::addConsoleCommandShortcut(this->ccSetTimeFactor_).accessLevel(AccessLevel::Offline).defaultValue(0, 1.0);
    71         }
     65        // time factor console command
     66        this->ccSetTimeFactor_ = createConsoleCommand(createFunctor(&GSRoot::setTimeFactor, this), "setTimeFactor");
     67        CommandExecutor::addConsoleCommandShortcut(this->ccSetTimeFactor_).accessLevel(AccessLevel::Offline).defaultValue(0, 1.0);
    7268
    73         {
    74             // time factor console command
    75             FunctorMember<GSRoot>* functor = createFunctor(&GSRoot::pause);
    76             functor->setObject(this);
    77             this->ccPause_ = createConsoleCommand(functor, "pause");
    78             CommandExecutor::addConsoleCommandShortcut(this->ccPause_).accessLevel(AccessLevel::Offline);
    79         }
     69        // time factor console command
     70        this->ccPause_ = createConsoleCommand(createFunctor(&GSRoot::pause, this), "pause");
     71        CommandExecutor::addConsoleCommandShortcut(this->ccPause_).accessLevel(AccessLevel::Offline);
    8072
    8173        // create the LevelManager
Note: See TracChangeset for help on using the changeset viewer.