Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 9, 2015, 5:55:42 PM (9 years ago)
Author:
fvultier
Message:

Munition may and must now be defined for each pawn separately. This way a heavy cruiser may carry more munition than a drone.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/fabienHS15/src/orxonox/weaponsystem/ReplenishingMunition.h

    r10688 r10791  
    5353            ReplenishingMunition(Context* context);
    5454            virtual ~ReplenishingMunition() {}
     55
     56            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     57           
    5558            virtual float getProgress();
    56             inline float getReplenishingMunitionAmount() const
    57                 { return replenishMunitionAmount_; }
     59            inline float getReplenishAmount() const
     60                { return replenishAmount_; }
     61            inline float getReplenishInterval() const
     62                { return replenishInterval_; }
    5863
    5964        protected:                         
    6065            float replenishInterval_; //!< The interval in which the munition is replenished.
    61             unsigned int replenishMunitionAmount_; //!< The amount by which it is replenished.
     66            unsigned int replenishAmount_; //!< The amount by which it is replenished.
    6267
    6368        private:
     
    6671
    6772            Timer replenishingTimer_; //!< Timer to do the replenishing.
     73
     74            inline void setReplenishAmount(unsigned int replenishAmount)
     75                { this->replenishAmount_ = replenishAmount; }
     76            inline void setReplenishInterval(float replenishInterval)
     77                { this->replenishInterval_ = replenishInterval; }             
    6878    };
    6979}
Note: See TracChangeset for help on using the changeset viewer.