Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 9, 2010, 9:32:58 PM (15 years ago)
Author:
rgrieder
Message:

Removed excess white space at the end of lines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/modules/pickup/items/DronePickup.cc

    r7034 r7127  
    4949
    5050    CreateFactory(DronePickup);
    51    
     51
    5252    /**
    5353    @brief
     
    5757    {
    5858        RegisterObject(DronePickup);
    59        
     59
    6060        this->initialize();
    6161    }
    62    
     62
    6363    /**
    6464    @brief
     
    6767    DronePickup::~DronePickup()
    6868    {
    69        
     69
    7070    }
    71    
     71
    7272    /**
    73     @brief 
     73    @brief
    7474        Initializes the member variables.
    7575    */
     
    8080        this->droneTemplate_ = "";
    8181    }
    82    
     82
    8383    /**
    8484    @brief
     
    9191        this->pickupIdentifier_->addParameter(type, val);
    9292    }
    93    
     93
    9494    /**
    9595    @brief
     
    100100        SUPER(DronePickup, XMLPort, xmlelement, mode);
    101101        XMLPortParam(DronePickup, "droneTemplate", setDroneTemplate, getDroneTemplate, xmlelement, mode);
    102        
     102
    103103        this->initializeIdentifier();
    104104    }
    105    
     105
    106106    void DronePickup::setDroneTemplate(std::string templatename){
    107107        droneTemplate_ = templatename;
    108     } 
    109    
     108    }
     109
    110110    const std::string& DronePickup::getDroneTemplate() const
    111111    {
     
    120120    {
    121121        SUPER(DronePickup, changedUsed);
    122        
     122
    123123        //! If the pickup is not picked up nothing must be done.
    124124        if(!this->isPickedUp())
    125125            return;
    126        
     126
    127127        //! If the pickup has transited to used.
    128128        if(this->isUsed())
     
    132132                if(pawn == NULL) //!< If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    133133                    this->destroy();
    134                
     134
    135135                //Attach to pawn
    136136                Drone* drone = new Drone(pawn->getCreator()); // this is neccessary because the projectiles fired need a valid creator for the particlespawner (when colliding against something)
     
    143143                    droneController->setOwner(pawn);
    144144                }
    145                
     145
    146146                Vector3 spawnPosition = pawn->getWorldPosition() + Vector3(30,0,-30);
    147147                drone->setPosition(spawnPosition);
    148                
     148
    149149                //! The pickup has been used up.
    150150                this->setUsed(false);
     
    159159        }
    160160    }
    161    
     161
    162162    /**
    163163    @brief
     
    170170        PickupCarrier* carrier = this->getCarrier();
    171171        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
    172        
     172
    173173        if(pawn == NULL)
    174174        {
    175175            COUT(1) << "Invalid PickupCarrier in DronePickup." << std::endl;
    176176        }
    177        
     177
    178178        return pawn;
    179179    }
    180    
     180
    181181    /**
    182182    @brief
     
    189189        if(item == NULL)
    190190            item = new DronePickup(this);
    191        
     191
    192192        SUPER(DronePickup, clone, item);
    193        
     193
    194194        DronePickup* pickup = dynamic_cast<DronePickup*>(item);
    195195        pickup->setDroneTemplate(this->getDroneTemplate());
    196        
     196
    197197        pickup->initializeIdentifier();
    198198    }
Note: See TracChangeset for help on using the changeset viewer.