Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2397 for code/branches


Ignore:
Timestamp:
Dec 10, 2008, 8:24:53 PM (16 years ago)
Author:
dsommer
Message:

teilweise doxy geaddet und weitere test instanzen

Location:
code/branches/pickups2/src/orxonox/objects/pickup
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickups2/src/orxonox/objects/pickup/ShipEquipment.cc

    r2389 r2397  
    66namespace orxonox
    77{
     8/**
     9@brief
     10    Insert a permanent Item to the Equipment. Is usually called by the addTo function in Items.
     11   
     12@param item
     13    pointer to the item which is to be inserted.
    814
     15@return
     16    if new item has sucessfully been added it will return true, in any other case the return value is false.
     17*/
    918        bool ShipEquipment::insert(Item* item)
    1019        {
     
    1726        {
    1827                COUT(3) << "SWAP?" <<  endl;
     28                //Abfrage- irgendne ifschleife...
    1929                if((checkSlot(item)->dropped(player))==true);
    2030                {
     
    2838        return false;
    2939        };
     40
     41/**
     42@brief
     43    Erases a permanent Item in the Equipment. Is usually called by the remove/dropped function in Items.
     44   
     45@param item
     46    pointer to the item which is to be erased.
     47
     48@return
     49    if new item has sucessfully been erased it will return true, in any other case the return value is false.
     50*/
    3051        bool ShipEquipment::erase (Item* item)
    3152        {
     
    4667
    4768        }*/
     69/**
     70@brief
     71    Erases all permanent Items in the Equipment. Its Triggered by hitting the L button.
     72
     73*/
    4874        void ShipEquipment::eraseAll()
    4975        {
  • code/branches/pickups2/src/orxonox/objects/pickup/ShipEquipment.h

    r2389 r2397  
    1818{
    1919    class Item;
     20/**
     21@brief
     22    ShipEquipment is the inventory of a player. It's part of the Pawn class.
    2023
     24*/
    2125    class _OrxonoxExport ShipEquipment
    2226    {
     
    4044        {this->player = setplayer;}
    4145        private:
    42             Pawn* player;
    43             std::multimap<std::string, Item*> Equipment;
    44             std::multimap<std::string, Item*> Usable;
    45             std::multimap<std::string, Item*> Trunk;
     46            Pawn* player;//!< Is a pointer to the belonging player
     47            std::multimap<std::string, Item*> Equipment;//!< the Equipment for permanent Items
     48            std::multimap<std::string, Item*> Usable;//!< Where Usables are stored
     49            std::multimap<std::string, Item*> Trunk;//!< Every other Item is stored here
    4650    };
    4751}
  • code/branches/pickups2/src/orxonox/objects/pickup/Turbo.cc

    r2389 r2397  
    4343                        {
    4444                        SpaceShip* ship = dynamic_cast <SpaceShip*>(player);
    45                         COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl;
    4645                        if(duration_==0 )
    47                         {       if(addTo(player))
    48                                         {       
     46                        {       
     47                                if(addTo(player))
     48                                {       
    4949                                                COUT(3)<<"ITEM EQUIPPED"<<std::endl;
    5050                                                this->setSpeedBoost(ship);
    51                                                 COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl;
    5251                                                return true;
    53                                         }
     52                                }
     53                                return false;
    5454                        }
    5555                        else
    5656                        {
    5757                                this->setSpeedBoost(ship);
    58                                 COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl;
    5958                                return true;
    6059                        }
     
    7372        ship->setRotAcc( ship->getRotAcc()-this->rotacc_);
    7473        COUT(3)<<"BOOST UNSET"<<std::endl;
     74        COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl;
    7575        }
    7676
    7777        void Turbo::setSpeedBoost(SpaceShip* ship)
    7878        {
     79        COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl;
    7980        ship->setMaxSpeed( ship->getMaxSpeed() + this->boost_);
    8081        ship->setTransAcc( ship->getTransAcc()*this->accboost_);
     
    8788                turbotimer_.setTimer(this->duration_, false, this, executor);
    8889        }
    89        
     90        COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl;
    9091        }
    9192        bool Turbo::dropped(Pawn* player)
Note: See TracChangeset for help on using the changeset viewer.