Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 14, 2008, 7:45:22 AM (16 years ago)
Author:
dafrick
Message:

Added some documentation.

Location:
code/branches/questsystem2/src/orxonox/objects/quest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestEffectBeacon.cc

    r2205 r2208  
    7575        if(!b || !(this->isActive()))
    7676        {
     77            COUT(3) << "The QuestEffectBeacon is inactive." << std::endl;
    7778            return false;
    7879        }
    7980        if(entity == NULL)
    8081        {
     82            COUT(2) << "No one triggered the beacon? Curious!" << std::endl;
    8183            return false;
    8284        }
    8385       
    8486        PlayerInfo* player = entity->getPlayer();
     87       
     88        if(player == NULL)
     89        {
     90            COUT(3) << "The PlayerInfo* is NULL." << std::endl;
     91            return false;
     92        }
    8593       
    8694        bool check = QuestEffect::invokeEffects(player, this->effects_);
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestEffectBeacon.h

    r2205 r2208  
    4949    /**
    5050    @brief
    51        
     51        A QuestEffectBeacon is an entity which can (under some condition(s)) invoke a number QuestEffects on players meeting the condition(s).
     52        The conditions under which the QuestEffects are invoked on the player are defined by Triggers.
     53        A QuestEffectBeacon can be executed a defined number of times.
    5254    @author
    5355        Damian 'Mozork' Frick
     
    6365            virtual void processEvent(Event& event);
    6466           
    65             bool execute(bool b, ControllableEntity* player);
     67            bool execute(bool b, ControllableEntity* player); //!< Executes the QuestEffects of the QuestEffectBeacon.
    6668           
    67             bool isActive(void);
     69            bool isActive(void); //!< Test whether the QuestEffectBeacon is active.
    6870           
    6971        protected:
    70             bool decrementTimes(void);
     72            bool decrementTimes(void); //!< Decrement the number of times the QuestEffectBeacon can still be executed.
    7173           
    72             inline const int & getTimes(void) const
     74            inline const int & getTimes(void) const //!< Return the number of times the QUestEffectBeacon can still be executed.
    7375                { return this->times_; }
    7476
    7577        private:
    76             std::list<QuestEffect*> effects_;
     78            std::list<QuestEffect*> effects_; //!< The list of QuestEffects to be invoked on the executing player.
    7779            int times_; //!< Number of times the beacon can be exectued.
    78             QuestEffectBeaconStatus::Enum status_;
     80            QuestEffectBeaconStatus::Enum status_; //!< The status of the QUestEffectBeacon, Can be eighter active or inactive.
    7981            PlayerTrigger* trigger_;
    8082           
    81             bool setTimes(const int & n);
     83            bool setTimes(const int & n); //!< Set the number of times the QuestEffectBeacon can be executed.
    8284            bool addEffect(QuestEffect* effect);
    8385            bool addTrigger(PlayerTrigger* trigger);
Note: See TracChangeset for help on using the changeset viewer.