Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 6, 2008, 12:02:05 AM (16 years ago)
Author:
dafrick
Message:

Started implementation of QuestEffectBeacon.
Done some documentation of QuestItem and subclasses.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestHint.h

    r2096 r2146  
    2626 *
    2727 */
     28 
     29/**
     30    @file QuestHint.h
     31    @brief
     32        Definition of the QuestHint class.
     33*/
    2834
    2935#ifndef _QuestHint_H__
     
    4147{
    4248
     49    //! The status of the hint.
    4350    enum Enum
    4451    {
     
    5259{
    5360
    54     class Player; //Forward declaration, remove when fully integrated into the objecthirarchy.
    55 
    5661    /**
    5762    @brief
    5863        Represents a hint in the game towards completing a Quest.
    5964        Consists of title and description in textual form and must belong to a quest.
    60         A QuestHit has a defined status (inactive or active, where inactive is default) for each player, which means each QuestHint exists only once for all players, it doesn't belong to a player, it just has different stati for each of them.
     65        A QuestHit has a defined status (inactive or active, where inactive is default) for each player, which means each QuestHint exists only once for all players, it doesn't belong to a player, it just has different states for each of them.
     66       
     67        Creating a QuestHint through XML goes as follows:
     68       
     69        <QuestHint id="hintId">  //Where hintId is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information
     70            <QuestDesctription title="" description="" />
     71        </QuestHint>
    6172    @author
    6273        Damian 'Mozork' Frick
     
    6980            virtual ~QuestHint();
    7081
    71             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     82            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestHint object through XML.
    7283
    73             bool isActive(Player* player); //!< Returns true if the hint is active for the input player.
     84            bool isActive(ControllableEntity* player); //!< Returns true if the hint is active for the input player.
    7485
    75             bool activate(Player* player); //!< Activates the hint for the input player.
    76 
     86            bool setActive(ControllableEntity* player); //!< Activates the hint for the input player.
    7787            bool setQuest(Quest* quest); //!< Sets the quest the hint belongs to.
    7888
    79             inline Quest* getQuest(void)
     89            inline Quest* getQuest(void) //!< Returns the quest the hint is attached to.
    8090               { return this->quest_; }
    8191
    8292        private:
     93            Quest* quest_; //!< The quest the hint belongs to.
     94            std::map<ControllableEntity*, questHintStatus::Enum> playerStatus_; //!< List of the status for each player, with the Player-pointer as key.
    8395
    84             void initialize(void);
    85 
    86             Quest* quest_; //!< The quest the hint belongs to.
    87             std::map<Player*, questHintStatus::Enum> playerStatus_; //!< List of the status for each player, with the Player-pointer as key.
     96            void initialize(void); //!< Initializes the object.
    8897
    8998    };
Note: See TracChangeset for help on using the changeset viewer.