Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6705


Ignore:
Timestamp:
Apr 13, 2010, 12:09:10 AM (15 years ago)
Author:
dafrick
Message:

Minor cleanup.

Location:
code/branches/ppspickups1/src
Files:
5 edited

Legend:

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

    r6643 r6705  
    236236    /**
    237237    @brief
    238         Starts the Pickup duration Timer.
     238        Starts the pickup duration timer.
     239        After the specified durationTime has expired the function pickupTimerCallback is called.
     240        pickupTimerCallback can be overloaded and thus the desired functionality can be implemented.
     241    @param durationTime
     242        The duration after which the expires and the callback function is called.
     243    @return
     244        Returns true if the pickup duration timer was started successfully, false if not.
    239245    */
    240246    bool Pickup::startPickupTimer(float durationTime)
     
    245251            return false;
    246252        }
    247         if (false) /* TODO: Check if Timer is already running */
     253        if (this->durationTimer_.isActive()) //!< Check if Timer is already running
    248254        {
    249255            COUT(1) << "Pickup durationTimer already in use." << std::endl;
    250256            return false;
    251257        }
    252         this->durationTimer_.setTimer(durationTime, false, createExecutor(createFunctor(&Pickup::PickupTimerCallBack, this)));
     258        this->durationTimer_.setTimer(durationTime, false, createExecutor(createFunctor(&Pickup::pickupTimerCallback, this)));
    253259        return true;
    254260    }
  • code/branches/ppspickups1/src/modules/pickup/Pickup.h

    r6607 r6705  
    137137            bool startPickupTimer(float durationTime);
    138138
    139             virtual void PickupTimerCallBack(void) {}
     139            virtual void pickupTimerCallback(void) {}
    140140
    141141            /**
     
    157157        private:
    158158            void initialize(void); //!< Initializes the member variables.
     159           
     160            //TODO: Problems, when there are more Timers needed? Solutions?
     161            Timer durationTimer_; //!< Timer at the disposal of each Class implementing Pickup.
    159162
    160163            pickupActivationType::Value activationType_; //!< The activation type of the Pickup.
     
    165168            static const std::string durationTypeOnce_s;
    166169            static const std::string durationTypeContinuous_s;
    167 
    168             float durationTime_;
    169             Timer durationTimer_;
    170170    };
    171171
  • code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.h

    r6681 r6705  
    9494}
    9595
    96 #endif // _HealthPickup_H__
     96#endif // _SpeedPickup_H__
  • code/branches/ppspickups1/src/orxonox/items/Engine.h

    r6643 r6705  
    115115            virtual const Vector3& getCarrierPosition(void);
    116116
    117             /* Should not be here */
     117            //TODO: Move to protected or private. How?
    118118            inline void setSpeedAdd(float speedAdd)
    119119                { this->speedAdd_=speedAdd; }
  • code/branches/ppspickups1/src/orxonox/worldentities/pawns/SpaceShip.cc

    r6607 r6705  
    224224    {
    225225        std::list<PickupCarrier*>* list = new std::list<PickupCarrier*>();
    226         list->push_front(engine_);
     226        list->push_front(this->engine_);
    227227        return list;
    228228    }
Note: See TracChangeset for help on using the changeset viewer.