Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 10, 2010, 4:23:29 PM (15 years ago)
Author:
benedict
Message:

did the shield pickup. upload for testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ppspickups3/src/modules/pickup/items/ShieldPickup.h

    r6869 r6884  
     1
    12/*
    23 *   ORXONOX - the hottest 3D action shooter ever to exist
     
    4950        A Pickup which can add a Shield to the Pawn.
    5051
    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.
    5455        4) The duration: the activation time of the pickup.
    5556
     
    7172            inline float getDuration(void)
    7273                { return this->duration_; }
    73 
     74            inline float getShieldHealth()
     75                { return this->shieldHealth_; }
     76            inline float getShieldAbsorption()
     77                { return this->shieldAbsorption_; }
    7478
    7579        protected:
    7680            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
    77            
     81
    7882            virtual void pickupTimerCallback(void); //!< Function that gets called when timer ends.
    7983
    8084            void setDuration(float duration);
    81 
     85            void setShieldHealth(float shieldHealth);
     86            void setShieldAbsorption(float shieldAbsorption);
    8287
    8388        private:
    8489            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.
    8691
    8792            float duration_; //!< The health that is transferred to the Pawn.
     93            float shieldHealth_;
     94            float shieldAbsorption_; // Has to be between 0 and 1
     95
    8896    };
    8997}
Note: See TracChangeset for help on using the changeset viewer.