Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 29, 2009, 10:19:38 PM (15 years ago)
Author:
landauf
Message:

merged libraries branch back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/quest/QuestEffectBeacon.h

    r3280 r5693  
    3535#define _QuestEffectBeacon_H__
    3636
    37 #include "OrxonoxPrereqs.h"
     37#include "objects/quest/QuestPrereqs.h"
    3838
    3939#include <list>
     
    5858        A QuestEffectBeacon can be executed a defined number of times.
    5959        A QuestEffectBeacon can be inactive or active.
    60        
     60
    6161        Creating a QuestEffectBeacon through XML goes as follows:
    62        
     62
    6363        <QuestEffectBeacon times=n> //Where 'n' is eighter a number >= 0, which means the QuestEffectBeacon can be executed n times. Or n = -1, which means the QuestEffectBeacon can be executed an infinite number of times.
    6464            <effects>
     
    7979        Damian 'Mozork' Frick
    8080    */
    81     class _OrxonoxExport QuestEffectBeacon : public StaticEntity
     81    class _QuestExport QuestEffectBeacon : public StaticEntity
    8282    {
    8383        public:
    8484            QuestEffectBeacon(BaseObject* creator);
    8585            virtual ~QuestEffectBeacon();
    86            
     86
    8787            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestEffectBeacon object through XML.
    88            
     88
    8989            virtual void processEvent(Event& event); //!< Processes an event for this QuestEffectBeacon.
    90            
     90
    9191            bool execute(bool b, PlayerTrigger* trigger); //!< Executes the QuestEffects of the QuestEffectBeacon.
    92            
     92
    9393            /**
    9494            @brief Tests whether the QuestEffectBeacon is active.
     
    9797            inline bool isActive(void)
    9898            { return this->status_ == QuestEffectBeaconStatus::Active; }
    99            
     99
    100100            bool setActive(bool activate); //!< Set the status of the QuestEffectBeacon.
    101            
     101
    102102        protected:
    103103            bool decrementTimes(void); //!< Decrement the number of times the QuestEffectBeacon can still be executed.
    104            
     104
    105105            /**
    106106            @brief Returns the number of times the QUestEffectBeacon can still be executed.
     
    109109            inline const int & getTimes(void) const
    110110                { return this->times_; }
    111    
     111
    112112        private:
    113113            static const int INFINITE_TIME = -1; //!< Constant to avoid using magic numbers.
    114            
     114
    115115            std::list<QuestEffect*> effects_; //!< The list of QuestEffects to be invoked on the executing player.
    116116            int times_; //!< Number of times the beacon can be exectued.
    117117            QuestEffectBeaconStatus::Value status_; //!< The status of the QUestEffectBeacon, Can be eighter active or inactive.
    118            
     118
    119119            bool setTimes(const int & n); //!< Set the number of times the QuestEffectBeacon can be executed.
    120120            bool addEffect(QuestEffect* effect); //!< Add a QuestEffect to the QuestEffectBeacon.
    121            
     121
    122122            const QuestEffect* getEffect(unsigned int index) const; //!< Get the QuestEffect at a given index.
    123    
     123
    124124    };
    125125
Note: See TracChangeset for help on using the changeset viewer.