Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 30, 2008, 9:52:12 AM (17 years ago)
Author:
dafrick
Message:

Started with XMLPort…

File:
1 edited

Legend:

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

    r2021 r2068  
    3333#include <string>
    3434
     35#include "core/XMLPort.h"
    3536#include "QuestDescription.h"
    3637#include "QuestItem.h"
     
    5657    @brief
    5758        Represents a hint in the game towards completing a Quest.
    58         Consists of title and description in textual form.
     59        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.
    5961    @author
    6062        Damian 'Mozork' Frick
     
    6567        public:
    6668            QuestHint();
    67             QuestHint(std::string id, std::string title = "", std::string description = "");
     69            QuestHint(std::string id);
    6870            ~QuestHint();
     71           
     72            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    6973           
    7074            bool isActive(Player* player); //!< Returns true if the hint is active for the input player.
     
    7276            bool activate(Player* player); //!< Activates the hint for the input player.
    7377           
    74             void setQuest(Quest* quest); //!< Sets the quest the hint belongs to.
     78            bool setQuest(Quest* quest); //!< Sets the quest the hint belongs to.
     79           
     80            inline Quest* getQuest(void)
     81               { return this->quest_; }
    7582           
    7683        private:
    7784           
    78             Quest* quest_;
    79             std::map<Player*, questHintStatus::Enum> playerStatus_;
     85            void initialize(void);
     86           
     87            Quest* quest_; //!< The quest the hint belongs to.
     88            std::map<Player*, questHintStatus::Enum> playerStatus_; //!< List of the status for each player, with the Player-pointer as key.
    8089   
    8190    };
Note: See TracChangeset for help on using the changeset viewer.