- Timestamp:
- Dec 25, 2009, 11:07:09 PM (15 years ago)
- Location:
- code/branches/pickup3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup3
- Property svn:mergeinfo changed
/code/branches/pickup2 (added) merged: 5942,5947,5953,6405
- Property svn:mergeinfo changed
-
code/branches/pickup3/src/orxonox/pickup/ModifierPickup.cc
r6417 r6419 43 43 44 44 /** 45 @brief Constructor. Registers the ModifierPickup. 46 @param creator Pointer to the object which created this item. 45 @brief 46 Constructor. Registers the ModifierPickup. 47 @param creator 48 Pointer to the object which created this item. 47 49 */ 48 50 ModifierPickup::ModifierPickup(BaseObject* creator) : PassiveItem(creator) … … 52 54 this->duration_ = 0.0f; 53 55 } 54 //! Deconstructor. 56 57 /** 58 @brief 59 Destructor. 60 */ 55 61 ModifierPickup::~ModifierPickup() 56 62 { 57 } 58 /** 59 @brief Method for loading information from a level file. 60 @param element XMLElement from which to read the data. 61 @param mode XMLPort mode to use. 62 */ 63 64 } 65 66 /** 67 @brief 68 Method for loading information from a level file. 69 @param element 70 XMLElement from which to read the data. 71 @param mode 72 XMLPort mode to use. 73 */ 74 //TODO: Comments: params can probably be ommitted. 63 75 void ModifierPickup::XMLPort(Element& element, XMLPort::Mode mode) 64 76 { … … 73 85 XMLPortParamTemplate(ModifierPickup, "accelerationMulti", setMultiplicativeAcceleration, getMultiplicativeAcceleration, element, mode, float); 74 86 } 75 /** 76 @brief 77 Invoked when a pawn picks up the pickup. 78 79 Adds the modifiers to the pawn and sets a timer (if effect is limited) 80 if the pickup could be added to the pawn's PickupCollection. 81 82 @param pawn Pawn which picked up the pickup. 83 @return Returns whether the pickup was able to be added to the pawn. 87 88 /** 89 @brief 90 Invoked when a pawn picks up the pickup. 91 92 Adds the modifiers to the pawn and sets a timer (if effect is limited) 93 if the pickup could be added to the pawn's PickupCollection. 94 95 @param pawn 96 Pawn which picked up the pickup. 97 @return 98 Returns whether the pickup was able to be added to the pawn. 84 99 */ 85 100 bool ModifierPickup::pickedUp(Pawn* pawn) … … 110 125 return false; 111 126 } 112 /** 113 @brief 114 Invoked when a pawn drops the pickup. 115 116 Removes the modifiers from the pawn if the pickup 117 was successfully removed from it's PickupCollection. 118 119 @param pawn Pawn which dropped the pickup. 120 @return Returns whether the pickup could be removed. 127 128 /** 129 @brief 130 Invoked when a pawn drops the pickup. 131 132 Removes the modifiers from the pawn if the pickup 133 was successfully removed from it's PickupCollection. 134 135 @param pawn 136 Pawn which dropped the pickup. 137 @return 138 Returns whether the pickup could be removed. 121 139 */ 122 140 bool ModifierPickup::dropped(Pawn* pawn) … … 145 163 return false; 146 164 } 147 /** 148 @brief Invoked when the timer finished, calls dropped(). 149 */ 165 166 /** 167 @brief Invoked when the timer finished, calls dropped(). 168 */ 169 //TODO: Other name for function? 150 170 void ModifierPickup::timerCallback(Pawn* pawn) 151 171 { … … 153 173 COUT(2) << "Failed to remove modifier pickup after the timer ran out!" << std::endl; 154 174 } 155 /** 156 @brief Gets the additive modifier of a given type. 157 @param type ModifierType for which to return the modifier. 158 @return Returns the additive modifier for type (or 0 if not exists). 175 176 /** 177 @brief 178 Gets the additive modifier of a given type. 179 @param type 180 ModifierType for which to return the modifier. 181 @return 182 Returns the additive modifier for type (or 0 if not exists). 159 183 */ 160 184 float ModifierPickup::getAdditiveModifier(ModifierType::Value type) const … … 166 190 return 0.0f; 167 191 } 168 /** 169 @brief Gets the multiplicative modifier of a given type. 170 @param type ModifierType for which to return the modifier. 171 @return Returns the multiplicative modifier for type (or 1 if not exists). 192 193 /** 194 @brief 195 Gets the multiplicative modifier of a given type. 196 @param type 197 ModifierType for which to return the modifier. 198 @return 199 Returns the multiplicative modifier for type (or 1 if not exists). 172 200 */ 173 201 float ModifierPickup::getMultiplicativeModifier(ModifierType::Value type) const … … 179 207 return 1.0f; 180 208 } 181 /** 182 @brief Gets the additive modifier of a given type. 183 @param type ModifierType for which to return the modifier. 184 @param value The new additive modifier for type. 209 210 /** 211 @brief 212 Gets the additive modifier of a given type. 213 @param type 214 ModifierType for which to return the modifier. 215 @param value 216 The new additive modifier for type. 185 217 */ 186 218 void ModifierPickup::setAdditiveModifier(ModifierType::Value type, float value) … … 191 223 this->additiveModifiers_[type] = value; 192 224 } 193 /** 194 @brief Gets the multiplicative modifier of a given type. 195 @param type ModifierType for which to return the modifier. 196 @param value The new multiplicative modifier for type. 225 226 /** 227 @brief 228 Gets the multiplicative modifier of a given type. 229 @param type 230 ModifierType for which to return the modifier. 231 @param value 232 The new multiplicative modifier for type. 197 233 */ 198 234 void ModifierPickup::setMultiplicativeModifier(ModifierType::Value type, float value) … … 203 239 this->multiplicativeModifiers_[type] = value; 204 240 } 241 205 242 }
Note: See TracChangeset
for help on using the changeset viewer.