Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 24, 2010, 9:49:54 AM (14 years ago)
Author:
dafrick
Message:

Removed Timer from Pickup, as this is no his core functionality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/pickup/Pickup.cc

    r7163 r7208  
    236236    }
    237237
    238     /**
    239     @brief
    240         Starts the pickup duration timer.
    241         After the specified durationTime has expired the function pickupTimerCallback is called.
    242         pickupTimerCallback can be overloaded and thus the desired functionality can be implemented.
    243     @param durationTime
    244         The duration after which the expires and the callback function is called.
    245     @return
    246         Returns true if the pickup duration timer was started successfully, false if not.
    247     */
    248     bool Pickup::startPickupTimer(float durationTime)
    249     {
    250         if (durationTime<=0)
    251         {
    252             COUT(1) << "Invalid durationTime in pickup." << std::endl;
    253             return false;
    254         }
    255         if (this->durationTimer_.isActive()) //!< Check if Timer is already running
    256         {
    257             COUT(1) << "Pickup durationTimer already in use." << std::endl;
    258             return false;
    259         }
    260         this->durationTimer_.setTimer(durationTime, false, createExecutor(createFunctor(&Pickup::pickupTimerCallback, this)));
    261         return true;
    262     }
    263238}
Note: See TracChangeset for help on using the changeset viewer.