- Timestamp:
- May 4, 2012, 3:56:56 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2012/src/modules/pickup/items/DamageBoostPickup.cc
r9119 r9155 21 21 * 22 22 * Author: 23 * Eric Beier23 * Kevin Lengauer 24 24 * Co-authors: 25 25 * ... … … 28 28 29 29 /** 30 @file SpeedPickup.cc31 @brief Implementation of the SpeedPickup class.30 @file DamageBoostPickup.cc 31 @brief Implementation of the DamageBoostPickup class. 32 32 */ 33 33 … … 71 71 { 72 72 this->duration_ = 0.0f; 73 this->damageMultiplier_ = 20.0f;73 this->damageMultiplier_ = 1.0f; //The default damage multiplier. 74 74 //Defines who is allowed to pick up the pickup. 75 75 this->addTarget(ClassIdentifier<SpaceShip>::getIdentifier()); … … 105 105 106 106 XMLPortParam(DamageBoostPickup, "duration", setDuration, getDuration, xmlelement, mode); 107 XMLPortParam(DamageBoostPickup, "damageMultiplier", setD efaultDamageMultiplier, getDefaultDamageMultiplier, xmlelement, mode);107 XMLPortParam(DamageBoostPickup, "damageMultiplier", setDamageMultiplier, getDamageMultiplier, xmlelement, mode); 108 108 109 109 this->initializeIdentifier(); 110 110 } 111 112 // Work in Progress setDamage Function 113 void DamageBoostPickup::setDamageMultiplier(float damageMultiplier) 114 { 115 if(damageMultiplier >= 1.0f) 116 { 117 this->damageMultiplier_ = damageMultiplier; 118 orxout() << "Set Damage " << damageMultiplier << endl; 119 } 120 } 121 111 122 112 123 /** … … 138 149 } 139 150 } 140 // NOTE: commented this since its use was not apparent 141 // ship->getCreator(); 142 151 152 // Saves the old default Damage that is needed to restore the original damage 143 153 this->olddamageMultiplier_ = ship->getDamageMultiplier(); 154 // Sets the new Damage with the damage multiplier. 144 155 ship->setDamageMultiplier( this->damageMultiplier_ ); 145 156 } … … 214 225 else 215 226 { 216 orxout(internal_error, context::pickups) << "Invalid duration in SpeedPickup." << endl;227 orxout(internal_error, context::pickups) << "Invalid duration in DamagePickup." << endl; 217 228 this->duration_ = 0.0f; 218 229 } 219 230 } 220 231 221 /* void DamageBoostPickup::setDamageBoost(float damageBoost) 222 { 223 224 } 225 void DamageBoostPickup::setDamageSave(float damageSave) 226 { 227 228 } 229 */ 230 232 /** 233 @brief 234 Helper method. Is called by the Timer as soon as it expires. 235 */ 231 236 void DamageBoostPickup::pickupTimerCallback(void) 232 237 {
Note: See TracChangeset
for help on using the changeset viewer.