- Timestamp:
- Mar 29, 2010, 12:30:32 PM (15 years ago)
- Location:
- code/branches/pickup4
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup4/data/gui/layouts/PickupInventory.layout
r6417 r6632 1 <?xml version="1.0" encoding="UTF-8" ?> 2 <GUILayout> 3 <Window Type="TaharezLook/FrameWindow" Name="orxonox/Inventory"> 4 <Property Name="UnifiedMinSize" Value="{{0.0,385},{0.0,200}}" /> 5 <Property Name="UnifiedMaxSize" Value="{{0.0,385},{0.0,200}}" /> 6 <Property Name="UnifiedPosition" Value="{{0.5,-100},{0.5,-85}}" /> 7 <Property Name="UnifiedSize" Value="{{0.0,385},{0.0,200}}" /> 8 <Property Name="Text" Value="Inventory" /> 9 <Property Name="CloseButtonEnabled" Value="False" /> 1 <?xml version="1.0" encoding="UTF-8"?> 10 2 11 <Window Type="TaharezLook/TabControl" Name="orxonox/Inventory/TabControl" > 12 <Property Name="Tooltip" Value="Inventory" /> 13 <Property Name="TabHeight" Value="{0,-1}" /> 3 <GUILayout > 4 <Window Type="DefaultWindow" Name="orxonox/PickupInventory/Background" > 5 <Property Name="InheritsAlpha" Value="False" /> 6 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 7 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 8 <Window Type="TaharezLook/StaticText" Name="orxonox/PickupInventory/PickupInventory" > 9 <Property Name="Text" Value="Pickup Inventory" /> 10 <Property Name="Alpha" Value="0.8" /> 11 <Property Name="InheritsAlpha" Value="False" /> 12 <Property Name="HorzFormatting" Value="HorzCentred" /> 14 13 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 15 <Property Name="TabPanePosition" Value="Bottom" /> 16 <Property Name="UnifiedAreaRect" Value="{{0,10},{0,30},{1,-10},{1,-10}}" /> 17 18 <Window Type="TaharezLook/ScrollablePane" Name="orxonox/Inventory/TabControl/TabEquipment"> 19 <Property Name="Text" Value="Equipment" /> 20 <Property Name="UnifiedPosition" Value="{{0.0,3},{0.0,3}}"/> 21 <Property Name="UnifiedSize" Value="{{1.0,-6},{1.0,-6}}"/> 22 </Window> 23 <Window Type="TaharezLook/ScrollablePane" Name="orxonox/Inventory/TabControl/TabUsable"> 24 <Property Name="Text" Value="Usable" /> 25 <Property Name="UnifiedPosition" Value="{{0.0,3},{0.0,3}}"/> 26 <Property Name="UnifiedSize" Value="{{1.0,-6},{1.0,-6}}"/> 14 <Property Name="VertFormatting" Value="TopAligned" /> 15 <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.15,0},{0.85,0},{0.8,0}}" /> 16 <Window Type="TaharezLook/StaticText" Name="orxonox/PickupInventory/Wrapper" > 17 <Property Name="TextColours" Value="FF4444FF" /> 18 <Property Name="InheritsAlpha" Value="False" /> 19 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 20 <Property Name="HorzFormatting" Value="HorzCentred" /> 21 <Property Name="VertFormatting" Value="TopAligned" /> 22 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.92,0}}" /> 23 <Window Type="TaharezLook/ScrollablePane" Name="orxonox/PickupInventory/Inventory" > 24 <Property Name="ContentArea" Value="l:0 t:0 r:0 b:0" /> 25 <Property Name="HorzStepSize" Value="0.005" /> 26 <Property Name="VertStepSize" Value="0.005" /> 27 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 28 <Property Name="HorzOverlapSize" Value="0.01" /> 29 <Property Name="UnifiedAreaRect" Value="{{0.005,0},{0.01,0},{0.995,0},{0.99,0}}" /> 30 <Property Name="VertOverlapSize" Value="0.01" /> 31 <Property Name="HorzScrollPosition" Value="0" /> 32 <Property Name="VertScrollPosition" Value="0" /> 33 </Window> 27 34 </Window> 28 35 </Window> 29 30 <Event Name="WindowUpdate" Function="PickupInventory.update" /> 36 <Window Type="TaharezLook/Button" Name="orxonox/PickupInventory/InventoryBackButton" > 37 <Property Name="Text" Value="Back" /> 38 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 39 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.8350,0},{0.6,0},{0.8800,0}}" /> 40 <Event Name="Clicked" Function="PickupInventory.InventoryBackButton_clicked"/> 41 </Window> 31 42 </Window> 32 43 </GUILayout> -
code/branches/pickup4/data/gui/scripts/PickupInventory.lua
r6417 r6632 3 3 BasicGUI = require("BasicGUI") 4 4 local P = BasicGUI:new() --inherit everything from the gui package 5 5 6 if _REQUIREDNAME == nil then 6 7 PickupInventory = P … … 12 13 P.layoutString = "PickupInventory.layout" 13 14 14 P.lastEquipmentCount_ = 0 15 P.lastUsableCount_ = 0 16 P.currentUsableID_ = 0 15 function P:init() 16 17 end 17 18 18 -- events 19 function P:frmUpdate(e) 20 local equipCount = orxonox.PickupInventory:getEquipmentCount() 21 local usableCount = orxonox.PickupInventory:getUsableCount() 22 23 if equipCount ~= self.lastEquipmentCount_ or usableCount ~= self.lastUsableCount_ then 24 self:updateTabs() 19 function P:show() 20 self.window:show() -- TODO: Do this through parent... 21 self.visible = true 22 23 carrierList = {} 24 25 -- TODO: Nicer? 26 local pickupManager = orxonox.PickupManager:getInstance() 27 local carrier = pickupManager:getPawn() 28 P.getCarrierList(carrier) 29 30 for k,v in pairs(carrierList) do 31 local args = {} 32 table.insert(args, v) 33 table.insert(args, k) 34 local window = P.createCarrierBox(args) 25 35 end 26 36 end 27 37 28 function P.update(e) 29 loadedGUIs["PickupInventory"]:frmUpdate(e) 30 end 38 function P.getCarrierList(carrier) 31 39 32 function P.itemClicked(e) 33 loadedGUIs["PickupInventory"]:mItemClicked(e) 34 end 35 36 function P:mItemClicked(e) 37 local w = CEGUI.toWindowEventArgs(e).window 38 local name = w:getName() 39 local t = name:sub(25, 27) 40 local i = name:sub(29) 41 42 if t == "equ" then 43 40 -- TODO: Test for nil or 0? 41 if carrier == nil then 42 return 44 43 end 45 46 if t == "use" then 47 if self.currentUsableID_ >= 0 then 48 winMgr:getWindow("orxonox/Inventory/Title/use/" .. self.currentUsableID_):setProperty("TextColours", "tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF") 44 45 table.insert(carrierList, carrier) 46 47 local numCarriers = orxonox.PickupManager.getInstance():getNumCarrierChildren(carrier) 48 if numCarriers == 0 then 49 return 50 end 51 52 for i=0,numCarriers-1,1 do 53 local child = orxonox.PickupManager.getInstance():getCarrierChild(i, carrier) 54 if child ~= nil then 55 P.getCarrierList(child) 49 56 end 50 orxonox.PickupInventory:selectUsable(tonumber(i))51 self.currentUsableID_ = tonumber(i)52 winMgr:getWindow("orxonox/Inventory/Title/use/" .. i):setProperty("TextColours", "tl:FFFF4444 tr:FFFF4444 bl:FFFF4444 br:FFFF4444")53 57 end 54 58 end 55 59 56 -- methods 57 function P:updateTabs() 58 local eqWin = winMgr:getWindow("orxonox/Inventory/TabControl/TabEquipment") 59 local usWin = winMgr:getWindow("orxonox/Inventory/TabControl/TabUsable") 60 orxonox.PickupInventory:getSingleton():clearInventory(winMgr, eqWin, usWin) 61 orxonox.PickupInventory:getSingleton():updateTabs(winMgr, eqWin, usWin) 60 function P.createCarrierBox(args) 61 local carrier = args[1] 62 local index = args[2] 63 64 local name = "orxonox/PickupInventory/Carrier" .. index 65 local window = winMgr:createWindow("TaharezLook/StaticText", name .. "/Title") 66 window:setText(carrier:getCarrierName()) 67 -- TODO: Does this exist? 68 local height = window:getHeight() 69 70 local box = winMgr:createWindow("TaharezLook/ScrollablePane", name .. "/Box") 71 box:setPosition(CEGUI.UVector2(CEGUI.UDim(0.05, 0), CEGUI.UDim(0, height))) 72 box:setWidth(CEGUI.UDim(0.9, 0)) 73 74 local numPickups = orxonox.PickupManager.getInstance():getNumPickups(carrier) 75 for i=0,numPickups-1,1 do 76 77 end 78 79 return window 80 end 62 81 63 self.currentUsableID_ = orxonox.PickupInventory:getCurrentUsableIndex() 64 self.lastEquipmentCount_ = orxonox.PickupInventory:getEquipmentCount() 65 self.lastUsableCount_ = orxonox.PickupInventory:getUsableCount() 82 function P.InventoryUseButton_clicked(e) 83 84 end 85 86 function P.InventoryDropButton_clicked(e) 87 88 end 89 90 function P.InventoryShowDetails_clicked(e) 91 92 end 93 94 function P.InventoryBackButton_clicked(e) 95 hideGUI("PickupInventory") 66 96 end 67 97 -
code/branches/pickup4/data/gui/scripts/QuestGUI.lua
r6417 r6632 11 11 12 12 function P:show() 13 self.window:show() -- T DO: Do this through parent...13 self.window:show() -- TODO: Do this through parent... 14 14 self.visible = true 15 15 -
code/branches/pickup4/data/overlays/hudtemplates3.oxo
r5980 r6632 101 101 visible = "false" 102 102 /> 103 104 <GUIOverlay 105 name = "PickupInventory" 106 guiname = "PickupInventory" 107 visible = "false" 108 /> 103 109 104 110 </OverlayGroup> -
code/branches/pickup4/src/modules/pickup/CMakeLists.txt
r6524 r6632 15 15 FIND_HEADER_FILES 16 16 TOLUA_FILES 17 PickupManager.h 18 PickupRepresentation.h 17 19 DEFINE_SYMBOL 18 20 "PICKUP_SHARED_BUILD" -
code/branches/pickup4/src/modules/pickup/PickupManager.cc
r6540 r6632 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "core/LuaState.h" 38 #include "core/GUIManager.h" 37 39 #include "core/ScopedSingletonManager.h" 38 40 #include "core/Identifier.h" 39 41 #include "interfaces/PickupCarrier.h" 42 #include "infos/PlayerInfo.h" 40 43 #include "worldentities/pawns/Pawn.h" 41 44 #include "PickupRepresentation.h" 42 45 46 #include "ToluaBindPickup.h" 47 43 48 namespace orxonox 44 49 { 45 50 // Register tolua_open function when loading the library 51 DeclareToluaInterface(Pickup); 52 46 53 ManageScopedSingleton(PickupManager, ScopeID::Root, false); 54 55 /*static*/ const std::string PickupManager::guiName_s = "PickupInventory"; 47 56 48 57 /** … … 110 119 } 111 120 121 PickupCarrier* PickupManager::getPawn(void) 122 { 123 Pawn* pawn = dynamic_cast<Pawn*>(GUIManager::getInstancePtr()->getPlayer(PickupManager::guiName_s)->getControllableEntity()); 124 if(pawn == NULL) 125 return NULL; 126 return dynamic_cast<PickupCarrier*>(pawn); 127 } 128 129 unsigned int PickupManager::getNumCarrierChildren(PickupCarrier* carrier) 130 { 131 return carrier->getNumCarrierChildren(); 132 } 133 134 PickupCarrier* PickupManager::getCarrierChild(unsigned int index, PickupCarrier* carrier) 135 { 136 return carrier->getCarrierChild(index); 137 } 138 139 PickupRepresentation* PickupManager::getPickupRepresentation(unsigned int index, PickupCarrier* carrier) 140 { 141 Pickupable* pickup = carrier->getPickup(index); 142 if(pickup == NULL) 143 return NULL; 144 145 return this->getRepresentation(pickup->getPickupIdentifier()); 146 } 147 148 149 unsigned int PickupManager::getNumPickups(PickupCarrier* carrier) 150 { 151 return carrier->getNumPickups(); 152 } 153 154 void PickupManager::dropPickup(unsigned int index, PickupCarrier* carrier) 155 { 156 Pickupable* pickup = carrier->getPickup(index); 157 carrier->drop(pickup); 158 } 159 160 void PickupManager::usePickup(unsigned int index, PickupCarrier* carrier, bool use) 161 { 162 Pickupable* pickup = carrier->getPickup(index); 163 pickup->setUsed(use); 164 } 165 112 166 } -
code/branches/pickup4/src/modules/pickup/PickupManager.h
r6540 r6632 44 44 #include "core/OrxonoxClass.h" 45 45 46 namespace orxonox 47 { 46 namespace orxonox // tolua_export 47 { // tolua_export 48 49 //TODO: Remove after transfer to orxonox/pickup 50 class PickupCarrier; // tolua_export 48 51 49 52 /** 50 53 @brief 51 54 Manages Pickupables. 52 In essence has two tasks to fulfill. Firstly it must link Pickupables (through their PickupIdentifiers) and their PickupRepresentations. Secondly it manages the Pickup GUI.55 In essence has two tasks to fulfill. Firstly it must link Pickupables (through their PickupIdentifiers) and their PickupRepresentations. Secondly it manages the PickupInventory. 53 56 //TODO: Manage Pickup GUI. 54 57 @author 55 58 Damian 'Mozork' Frick 56 59 */ 57 class _PickupExport PickupManager : public Singleton<PickupManager>, public OrxonoxClass 58 { 60 class _PickupExport PickupManager // tolua_export 61 : public Singleton<PickupManager>, public OrxonoxClass 62 { // tolua_export 59 63 friend class Singleton<PickupManager>; 60 64 … … 63 67 virtual ~PickupManager(); 64 68 65 static PickupManager& getInstance() { return Singleton<PickupManager>::getInstance(); } 69 static PickupManager& getInstance() { return Singleton<PickupManager>::getInstance(); } // tolua_export 66 70 67 71 bool registerRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation); //!< Registers a PickupRepresentation together with the PickupIdentifier of the Pickupable the PickupRepresentation represents. 68 72 PickupRepresentation* getRepresentation(const PickupIdentifier* identifier); //!< Get the PickupRepresentation representing the Pickupable with the input PickupIdentifier. 69 73 74 // tolua_begin 75 PickupCarrier* getPawn(void); 76 77 unsigned int getNumCarrierChildren(PickupCarrier* carrier); 78 PickupCarrier* getCarrierChild(unsigned int index, PickupCarrier* carrier); 79 80 unsigned int getNumPickups(PickupCarrier* carrier); 81 PickupRepresentation* getPickupRepresentation(unsigned int index, PickupCarrier* carrier); 82 void dropPickup(unsigned int index, PickupCarrier* carrier); 83 void usePickup(unsigned int index, PickupCarrier* carrier, bool use); 84 // tolua_end 85 70 86 private: 71 87 static PickupManager* singletonPtr_s; 88 static const std::string guiName_s; 72 89 73 90 PickupRepresentation* defaultRepresentation_; //!< The default PickupRepresentation. 74 91 std::map<const PickupIdentifier*, PickupRepresentation*, PickupIdentifierCompare> representations_; //!< Map linking PickupIdentifiers (representing types if Pickupables) and PickupRepresentations. 75 92 76 }; 93 }; // tolua_export 77 94 78 } 95 } // tolua_export 79 96 80 97 #endif // _PickupManager_H__ -
code/branches/pickup4/src/modules/pickup/PickupPrereqs.h
r6524 r6632 65 65 namespace orxonox 66 66 { 67 67 68 68 class DroppedPickup; 69 69 class Pickup; -
code/branches/pickup4/src/modules/pickup/PickupRepresentation.cc
r6540 r6632 86 86 this->name_ = "Pickup"; 87 87 this->spawnerTemplate_ = ""; 88 this->inventoryRepresentation_ = ""; 88 89 this->pickup_ = NULL; 89 90 } … … 100 101 XMLPortParam(PickupRepresentation, "description", setDescription, getDescription, xmlelement, mode); 101 102 XMLPortParam(PickupRepresentation, "spawnerTemplate", setSpawnerTemplate, getSpawnerTemplate, xmlelement, mode); 103 XMLPortParam(PickupRepresentation, "inventoryRepresentation", setInventoryRepresentation, getInventoryRepresentation, xmlelement, mode); 102 104 XMLPortObject(PickupRepresentation, Pickupable, "pickup", setPickup, getPickup, xmlelement, mode); 103 105 XMLPortObject(PickupRepresentation, StaticEntity, "spawner-representation", setSpawnerRepresentation, getSpawnerRepresentationIndex, xmlelement, mode); -
code/branches/pickup4/src/modules/pickup/PickupRepresentation.h
r6540 r6632 45 45 #include "core/BaseObject.h" 46 46 47 namespace orxonox 48 { 47 namespace orxonox // tolua_export 48 { // tolua_export 49 49 50 50 /** … … 53 53 They are created through XML and are registered with the PickupManager. 54 54 */ 55 class _PickupExport PickupRepresentation : public BaseObject 56 { 55 class _PickupExport PickupRepresentation // tolua_export 56 : public BaseObject 57 { // tolua_export 57 58 58 59 public: … … 90 91 { this->spawnerRepresentation_ = representation; } 91 92 /** 93 @brief Set the image representing the pickup in the PickupInventory. 94 @param image A string with the name of the image representing the pickup. 95 */ 96 inline void setInventoryRepresentation(const std::string& image) 97 { this->inventoryRepresentation_ = image; } 98 /** 92 99 @brief Set the Pickupable that is represented by this PickupRepresentation. 93 100 @param pickup A pointer to the Pickupable. … … 100 107 @return Returns the name. 101 108 */ 102 inline const std::string& getName(void) 103 { return this->name_; } 109 inline const std::string& getName(void) { return this->name_; } // tolua_export 104 110 /** 105 111 @brief Get the description of the Pickupable represented by this PickupRepresentation. 106 112 @return Returns the description. 107 113 */ 108 inline const std::string& getDescription(void) 109 { return this->description_; } 114 inline const std::string& getDescription(void) { return this->description_; } // tolua_export 110 115 /** 111 116 @brief Get the name of spawnerTemplate the Pickupable represented by this PickupRepresentation. … … 121 126 inline const StaticEntity* getSpawnerRepresentationIndex(unsigned int index) 122 127 { if(index == 0) return this->spawnerRepresentation_; return NULL; } 128 /** 129 @brief Get the name of the image representing the pickup in the PickupInventory. 130 @return Returns the name of the image as a string. 131 */ 132 inline const std::string& getInventoryRepresentation(void) { return this->inventoryRepresentation_; } // tolua_export 123 133 /** 124 134 @brief Get the Pickupable represented by this PickupRepresentation. … … 139 149 std::string spawnerTemplate_; //!< The name of the template of this PickupRepresentation. 140 150 StaticEntity* spawnerRepresentation_; //!< The spawnerRepresentation of this PickupRepresentation. 151 std::string inventoryRepresentation_; //!< The name of an image representing the pickup in the PickupInventory. TODO: Exact format and placement of image? 141 152 142 153 Pickupable* pickup_; //!< The Pickupable that is represented by this PickupRepresentation. 143 154 144 }; 155 }; // tolua_export 145 156 146 } 157 } // tolua_export 147 158 148 159 #endif // _PickupRepresentation_H__ -
code/branches/pickup4/src/orxonox/CMakeLists.txt
r6524 r6632 58 58 MoodManager.h 59 59 controllers/HumanController.h 60 interfaces/PickupCarrier.h 60 61 sound/SoundManager.h 61 62 DEFINE_SYMBOL -
code/branches/pickup4/src/orxonox/interfaces/InterfaceCompilation.cc
r6534 r6632 60 60 RegisterRootObject(PickupCarrier); 61 61 62 this->setCarrierName("PickupCarrier"); 62 63 } 63 64 -
code/branches/pickup4/src/orxonox/interfaces/PickupCarrier.h
r6563 r6632 45 45 #include "core/OrxonoxClass.h" 46 46 47 namespace orxonox 48 { 49 50 //! Pre-declarations. 47 namespace orxonox // tolua_export 48 { // tolua_export 49 50 //! Forward-declarations. 51 class PickupManager; 51 52 class Pickup; 52 53 class HealthPickup; … … 59 60 Damian 'Mozork' Frick 60 61 */ 61 class _OrxonoxExport PickupCarrier : virtual public OrxonoxClass 62 { 62 class _OrxonoxExport PickupCarrier // tolua_export 63 : virtual public OrxonoxClass 64 { // tolua_export 63 65 //! So that the different Pickupables have full access to their PickupCarrier. 66 friend class Pickupable; 67 friend class PickupManager; 64 68 //! Friends. 65 friend class Pickupable;66 69 friend class Pickup; 67 70 friend class HealthPickup; … … 116 119 117 120 //! Go recursively through all children to check whether they are a target. 118 std:: list<PickupCarrier*>* children = this->getCarrierChildren();119 for(std:: list<PickupCarrier*>::const_iterator it = children->begin(); it != children->end(); it++)121 std::vector<PickupCarrier*>* children = this->getCarrierChildren(); 122 for(std::vector<PickupCarrier*>::const_iterator it = children->begin(); it != children->end(); it++) 120 123 { 121 124 if((*it)->isTarget(pickup)) … … 143 146 144 147 //! Go recursively through all children to check whether they are the target. 145 std:: list<PickupCarrier*>* children = this->getCarrierChildren();146 for(std:: list<PickupCarrier*>::iterator it = children->begin(); it != children->end(); it++)148 std::vector<PickupCarrier*>* children = this->getCarrierChildren(); 149 for(std::vector<PickupCarrier*>::iterator it = children->begin(); it != children->end(); it++) 147 150 { 148 151 if(pickup->isTarget(*it)) … … 162 165 */ 163 166 virtual const Vector3& getCarrierPosition(void) = 0; 167 168 const std::string& getCarrierName(void) { return this->carrierName_; } // tolua_export 164 169 165 170 protected: … … 170 175 @return Returns a pointer to a list of all direct children. 171 176 */ 172 virtual std:: list<PickupCarrier*>* getCarrierChildren(void) = 0;177 virtual std::vector<PickupCarrier*>* getCarrierChildren(void) = 0; 173 178 /** 174 179 @brief Get the parent of this PickupSpawner … … 184 189 std::set<Pickupable*>& getPickups(void) 185 190 { return this->pickups_; } 191 192 void setCarrierName(const std::string& name) 193 { this->carrierName_ = name; } 186 194 187 195 private: 188 196 std::set<Pickupable*> pickups_; //!< The list of Pickupables carried by this PickupCarrier. 189 190 }; 191 } 197 std::string carrierName_; 198 199 unsigned int getNumCarrierChildren(void) 200 { 201 std::vector<PickupCarrier*>* list = this->getCarrierChildren(); 202 unsigned int size = list->size(); 203 delete list; 204 return size; 205 } 206 207 PickupCarrier* getCarrierChild(unsigned int index) 208 { 209 std::vector<PickupCarrier*>* list = this->getCarrierChildren(); 210 if(list->size() < index) 211 return NULL; 212 PickupCarrier* carrier = (*list)[index]; 213 delete list; 214 return carrier; 215 } 216 217 Pickupable* getPickup(unsigned int index) 218 { 219 std::set<Pickupable*>::iterator it; 220 for(it = this->pickups_.begin(); index != 0 && it != this->pickups_.end(); it++) 221 index--; 222 if(it == this->pickups_.end()) 223 return NULL; 224 return *it; 225 } 226 227 unsigned int getNumPickups(void) 228 { return this->pickups_.size(); } 229 230 231 }; // tolua_export 232 } // tolua_export 192 233 193 234 #endif /* _PickupCarrier_H__ */ -
code/branches/pickup4/src/orxonox/overlays/OrxonoxOverlay.cc
r6502 r6632 327 327 { 328 328 OrxonoxOverlay* overlay= it->second; 329 COUT(1) << "MUP" << std::endl; 329 330 if(overlay->isVisible()) 331 { 330 332 overlay->hide(); 333 COUT(1) << "HIDE " << name << std::endl; 334 } 331 335 else 336 { 332 337 overlay->show(); 338 COUT(1) << "SHOW " << name << std::endl; 339 } 333 340 } 334 341 } -
code/branches/pickup4/src/orxonox/worldentities/pawns/Pawn.h
r6540 r6632 37 37 #include "worldentities/ControllableEntity.h" 38 38 39 namespace orxonox 40 { 41 class _OrxonoxExport Pawn : public ControllableEntity, public RadarViewable, public PickupCarrier 42 { 39 namespace orxonox // tolua_export 40 { // tolua_export 41 class _OrxonoxExport Pawn // tolua_export 42 : public ControllableEntity, public RadarViewable, public PickupCarrier 43 { // tolua_export 43 44 friend class WeaponSystem; 44 45 … … 132 133 bool bAlive_; 133 134 134 virtual std:: list<PickupCarrier*>* getCarrierChildren(void)135 { return new std:: list<PickupCarrier*>(); }135 virtual std::vector<PickupCarrier*>* getCarrierChildren(void) 136 { return new std::vector<PickupCarrier*>(); } 136 137 virtual PickupCarrier* getCarrierParent(void) 137 138 { return NULL; } … … 155 156 156 157 Vector3 aimPosition_; 157 }; 158 } 158 }; // tolua_export 159 } // tolua_export 159 160 160 161 #endif /* _Pawn_H__ */
Note: See TracChangeset
for help on using the changeset viewer.