- Timestamp:
- Oct 14, 2009, 1:44:19 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2/src/orxonox/pickup/PickupSpawner.cc
r5929 r5947 53 53 54 54 /** 55 @brief Constructor. Registers the PickupSpawner. 56 @param creator Pointer to the object which created this item. 55 @brief 56 Constructor. Registers the PickupSpawner. 57 @param creator 58 Pointer to the object which created this item. 57 59 */ 58 60 PickupSpawner::PickupSpawner(BaseObject* creator) : StaticEntity(creator) … … 65 67 this->tickSum_ = 0.0f; 66 68 } 67 //! Deconstructor. 69 70 /** 71 @brief 72 Destructor. 73 */ 68 74 PickupSpawner::~PickupSpawner() 69 75 { 70 } 71 /** 72 @brief Method for creating a PickupSpawner through XML. 73 @param xmlelement XML element which contains the PickupSpawner. 74 @param mode XMLPort mode. 76 77 } 78 79 /** 80 @brief 81 Method for creating a PickupSpawner through XML. 82 @param xmlelement 83 XML element which contains the PickupSpawner. 84 @param mode 85 XMLPort mode. 75 86 */ 76 87 void PickupSpawner::XMLPort(Element& xmlelement, XMLPort::Mode mode) … … 82 93 XMLPortParam(PickupSpawner, "respawnTime", setRespawnTime, getRespawnTime, xmlelement, mode); 83 94 95 //TODO: Kill hack. 84 96 // HACKs 85 97 // Load the GUI image as soon as the PickupSpawner gets loaded … … 100 112 PickupInventory::getSingleton(); 101 113 } 102 /** 103 @brief Invoked when the activity has changed. Sets visibility of attached objects. 114 115 /** 116 @brief 117 Invoked when the activity has changed. Sets visibility of attached objects. 104 118 */ 105 119 void PickupSpawner::changedActivity() … … 110 124 (*it)->setVisible(this->isActive()); 111 125 } 112 /** 113 @brief Set the template name of the item to spawn, also loads the template. 114 @param name Name of the new template. 126 127 /** 128 @brief 129 Set the template name of the item to spawn, also loads the template. 130 @param name 131 Name of the new template. 115 132 */ 116 133 void PickupSpawner::setItemTemplateName(const std::string& name) … … 119 136 this->itemTemplate_ = Template::getTemplate(name); 120 137 } 121 /** 122 @brief Tick, checks if any Pawn is close enough to trigger. 123 @param dt Time since last tick. 124 */ 138 139 /** 140 @brief 141 Tick, checks if any Pawn is close enough to trigger. 142 @param dt 143 Time since last tick. 144 */ 145 //TODO: Replace this with a real DistanceTrigger. 125 146 void PickupSpawner::tick(float dt) 126 147 { … … 140 161 } 141 162 } 142 /** 143 @brief 144 Trigger the PickupSpawner. 145 146 Adds the pickup to the Pawn that triggered, 147 sets the timer to re-activate and deactives the PickupSpawner. 148 149 @param pawn Pawn which triggered the PickupSpawner. 163 164 /** 165 @brief 166 Trigger the PickupSpawner. 167 168 Adds the pickup to the Pawn that triggered, 169 sets the timer to re-activate and deactives the PickupSpawner. 170 171 @param pawn 172 Pawn which triggered the PickupSpawner. 150 173 */ 151 174 void PickupSpawner::trigger(Pawn* pawn) … … 177 200 } 178 201 } 179 /** 180 @brief Invoked by the timer, re-activates the PickupSpawner. 202 203 /** 204 @brief 205 Invoked by the timer, re-activates the PickupSpawner. 181 206 */ 182 207 void PickupSpawner::respawnTimerCallback()
Note: See TracChangeset
for help on using the changeset viewer.