Changeset 2397 for code/branches
- Timestamp:
- Dec 10, 2008, 8:24:53 PM (16 years ago)
- 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 6 6 namespace orxonox 7 7 { 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. 8 14 15 @return 16 if new item has sucessfully been added it will return true, in any other case the return value is false. 17 */ 9 18 bool ShipEquipment::insert(Item* item) 10 19 { … … 17 26 { 18 27 COUT(3) << "SWAP?" << endl; 28 //Abfrage- irgendne ifschleife... 19 29 if((checkSlot(item)->dropped(player))==true); 20 30 { … … 28 38 return false; 29 39 }; 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 */ 30 51 bool ShipEquipment::erase (Item* item) 31 52 { … … 46 67 47 68 }*/ 69 /** 70 @brief 71 Erases all permanent Items in the Equipment. Its Triggered by hitting the L button. 72 73 */ 48 74 void ShipEquipment::eraseAll() 49 75 { -
code/branches/pickups2/src/orxonox/objects/pickup/ShipEquipment.h
r2389 r2397 18 18 { 19 19 class Item; 20 /** 21 @brief 22 ShipEquipment is the inventory of a player. It's part of the Pawn class. 20 23 24 */ 21 25 class _OrxonoxExport ShipEquipment 22 26 { … … 40 44 {this->player = setplayer;} 41 45 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 46 50 }; 47 51 } -
code/branches/pickups2/src/orxonox/objects/pickup/Turbo.cc
r2389 r2397 43 43 { 44 44 SpaceShip* ship = dynamic_cast <SpaceShip*>(player); 45 COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl;46 45 if(duration_==0 ) 47 { if(addTo(player)) 48 { 46 { 47 if(addTo(player)) 48 { 49 49 COUT(3)<<"ITEM EQUIPPED"<<std::endl; 50 50 this->setSpeedBoost(ship); 51 COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl;52 51 return true; 53 } 52 } 53 return false; 54 54 } 55 55 else 56 56 { 57 57 this->setSpeedBoost(ship); 58 COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl;59 58 return true; 60 59 } … … 73 72 ship->setRotAcc( ship->getRotAcc()-this->rotacc_); 74 73 COUT(3)<<"BOOST UNSET"<<std::endl; 74 COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl; 75 75 } 76 76 77 77 void Turbo::setSpeedBoost(SpaceShip* ship) 78 78 { 79 COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl; 79 80 ship->setMaxSpeed( ship->getMaxSpeed() + this->boost_); 80 81 ship->setTransAcc( ship->getTransAcc()*this->accboost_); … … 87 88 turbotimer_.setTimer(this->duration_, false, this, executor); 88 89 } 89 90 COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl; 90 91 } 91 92 bool Turbo::dropped(Pawn* player)
Note: See TracChangeset
for help on using the changeset viewer.