- Timestamp:
- May 27, 2010, 10:44:10 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/orxonox/interfaces/Pickupable.cc
r6901 r6996 34 34 #include "Pickupable.h" 35 35 36 #include "core/LuaState.h" 37 #include "core/GUIManager.h" 36 38 #include "core/Identifier.h" 37 39 #include "core/CoreIncludes.h" 40 #include "util/Convert.h" 41 #include "infos/PlayerInfo.h" 38 42 #include "pickup/PickupIdentifier.h" 43 #include "worldentities/pawns/Pawn.h" 39 44 #include "PickupCarrier.h" 40 45 … … 91 96 this->used_ = used; 92 97 this->changedUsed(); 98 99 GUIManager::getInstance().getLuaState()->doString("PickupInventory.update()"); 93 100 return true; 94 101 } … … 196 203 this->pickedUp_ = pickedUp; 197 204 this->changedPickedUp(); 205 GUIManager::getInstance().getLuaState()->doString("PickupInventory.update()"); 198 206 return true; 199 207 } … … 273 281 SUPER(Pickupable, clone, item); 274 282 } 283 284 /** 285 @brief 286 Method to transcribe a Pickupable as a Rewardable to the player. 287 @param player 288 A pointer to the PlayerInfo, do whatever you want with it. 289 @return 290 Return true if successful. 291 */ 292 bool Pickupable::reward(PlayerInfo* player) 293 { 294 ControllableEntity* entity = player->getControllableEntity(); 295 Pawn* pawn = static_cast<Pawn*>(entity); 296 PickupCarrier* carrier = static_cast<PickupCarrier*>(pawn); 297 return carrier->pickup(this); 298 } 275 299 276 300 }
Note: See TracChangeset
for help on using the changeset viewer.