Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 16, 2010, 9:35:11 PM (15 years ago)
Author:
dafrick
Message:

Removed some TODO's. Finished up documenting pickup module.

File:
1 edited

Legend:

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

    r6524 r6540  
    2828
    2929/**
    30     @file
    31     @brief Implementation of PickupSpawner.
     30    @file PickupSpawner.cc
     31    @brief Implementation of the PickupSpawner class.
    3232*/
    3333
     
    5252        Pointer to the object which created this item.
    5353    */
    54     PickupSpawner::PickupSpawner(BaseObject* creator) : StaticEntity(creator)
    55     {
     54    PickupSpawner::PickupSpawner(BaseObject* creator) : StaticEntity(creator), pickup_(NULL)
     55    {
     56        RegisterObject(PickupSpawner);
     57       
    5658        this->initialize();
    57 
    58         RegisterObject(PickupSpawner);
    5959    }
    6060
     
    7373        The maximum number of items spawned by this PickupSpawner.
    7474    */
    75     PickupSpawner::PickupSpawner(BaseObject* creator, Pickupable* pickup, float triggerDistance, float respawnTime, int maxSpawnedItems) : StaticEntity(creator)
     75    PickupSpawner::PickupSpawner(BaseObject* creator, Pickupable* pickup, float triggerDistance, float respawnTime, int maxSpawnedItems) : StaticEntity(creator), pickup_(NULL)
    7676    {
    7777        RegisterObject(PickupSpawner);
     
    103103    void PickupSpawner::initialize(void)
    104104    {
    105         this->pickup_ = NULL;
    106        
    107105        this->triggerDistance_ = 20;
    108106        this->respawnTime_ = 0;
     
    170168        Time since last tick.
    171169    */
    172     //TODO: Replace this with a real DistanceTrigger? Or better with collisions?
     170    //TODO: Replace with collisions.
    173171    void PickupSpawner::tick(float dt)
    174172    {
     173        SUPER(PickupSpawner, tick, dt);
     174       
    175175        //! If the PickupSpawner is active.
    176176        if (this->isActive())
     
    215215        if(this->spawnsRemaining_ != 0 && this->respawnTime_ > 0)
    216216        {
    217             //TODO: Nicer? Does this even work?
    218217            this->startRespawnTimer();
    219218
     
    278277        Pawn which triggered the PickupSpawner.
    279278    */
    280     //TODO: Make more generic -> without pawn.
    281279    void PickupSpawner::trigger(Pawn* pawn)
    282280    {
     
    314312            else
    315313            {
    316                 //TODO: Really that severe?
    317314                if(target == NULL)
    318315                    COUT(1) << "PickupSpawner: Pickupable has no target." << std::endl;
Note: See TracChangeset for help on using the changeset viewer.