- Timestamp:
- May 10, 2010, 4:23:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ppspickups3/src/modules/pickup/items/ShieldPickup.h
r6869 r6884 1 1 2 /* 2 3 * ORXONOX - the hottest 3D action shooter ever to exist … … 49 50 A Pickup which can add a Shield to the Pawn. 50 51 51 1) The Shield multiplier: 52 The additional (forward) Shield: 53 2) The activation type: 'immediate' or 'onUse'. defines if the item is used when it's picked up or only after the player chooses to use it.52 1) The percentage: The percentage the shield takes from the damage dealt to a Pawn 53 2) The hit points: The amount of damage points a shield can teake before collapsing 54 3) The activation type: 'immediate' or 'onUse'. defines if the item is used when it's picked up or only after the player chooses to use it. 54 55 4) The duration: the activation time of the pickup. 55 56 … … 71 72 inline float getDuration(void) 72 73 { return this->duration_; } 73 74 inline float getShieldHealth() 75 { return this->shieldHealth_; } 76 inline float getShieldAbsorption() 77 { return this->shieldAbsorption_; } 74 78 75 79 protected: 76 80 void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup. 77 81 78 82 virtual void pickupTimerCallback(void); //!< Function that gets called when timer ends. 79 83 80 84 void setDuration(float duration); 81 85 void setShieldHealth(float shieldHealth); 86 void setShieldAbsorption(float shieldAbsorption); 82 87 83 88 private: 84 89 void initialize(void); //!< Initializes the member variables. 85 Engine* carrierToEngineHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.90 Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails. 86 91 87 92 float duration_; //!< The health that is transferred to the Pawn. 93 float shieldHealth_; 94 float shieldAbsorption_; // Has to be between 0 and 1 95 88 96 }; 89 97 }
Note: See TracChangeset
for help on using the changeset viewer.