Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/objects/quest/QuestHint.h @ 2850

Last change on this file since 2850 was 2826, checked in by landauf, 16 years ago

merged miniprojects branch back to trunk

  • Property svn:eol-style set to native
  • Property svn:mergeinfo set to (toggle deleted branches)
    /code/branches/lodfinal/src/orxonox/objects/quest/QuestHint.hmergedeligible
    /code/branches/miniprojects/src/orxonox/objects/quest/QuestHint.hmergedeligible
    /code/trunk/src/orxonox/objects/quest/QuestHint.hmergedeligible
    /code/branches/buildsystem2/src/orxonox/objects/quest/QuestHint.h2506-2658
    /code/branches/buildsystem3/src/orxonox/objects/quest/QuestHint.h2662-2708
    /code/branches/network/src/orxonox/objects/quest/QuestHint.h2356
    /code/branches/network64/src/orxonox/objects/quest/QuestHint.h2210-2355
    /code/branches/objecthierarchy2/src/orxonox/objects/quest/QuestHint.h2171-2479
    /code/branches/overlay/src/orxonox/objects/quest/QuestHint.h2117-2385
    /code/branches/physics/src/orxonox/objects/quest/QuestHint.h2107-2439
    /code/branches/physics_merge/src/orxonox/objects/quest/QuestHint.h2436-2457
    /code/branches/pickups2/src/orxonox/objects/quest/QuestHint.h2107-2497
    /code/branches/presentation/src/orxonox/objects/quest/QuestHint.h2369-2652,​2654-2660
    /code/branches/questsystem2/src/orxonox/objects/quest/QuestHint.h2107-2259
    /code/branches/weapon2/src/orxonox/objects/quest/QuestHint.h2107-2488
File size: 3.3 KB
RevLine 
[1992]1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Damian 'Mozork' Frick
24 *   Co-authors:
25 *      ...
26 *
27 */
[2261]28 
29/**
[2662]30    @file
31    @brief Definition of the QuestHint class.
[2261]32*/
[2092]33
[1992]34#ifndef _QuestHint_H__
35#define _QuestHint_H__
36
[2095]37#include "OrxonoxPrereqs.h"
38
[1996]39#include <map>
[1992]40#include <string>
41
[2068]42#include "core/XMLPort.h"
[1992]43#include "QuestItem.h"
44
[2662]45namespace orxonox
[2021]46{
[2662]47    namespace questHintStatus
[2021]48    {
49
[2662]50        //! The state of the hint.
51        enum Enum
52        {
53            inactive,
54            active
55        };
[2021]56
[2662]57    }
[1992]58
59    /**
60    @brief
61        Represents a hint in the game towards completing a Quest.
[2261]62        Consists of title and description (which is stored in a QuestDescription object) in textual form and must belong to a quest.
63        A QuestHint has a defined status (inactive or active, where inactive is default) for each player, which means each a QuestHint exists only once for all players, it doesn't belong to a player, it just has different states for each of them.
64       
65        Creating a QuestHint through XML goes as follows:
66       
67        <QuestHint id="hintId">  //Where hintId is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information
68            <QuestDesctription title="" description="" />
69        </QuestHint>
[1992]70    @author
71        Damian 'Mozork' Frick
72    */
[2095]73    class _OrxonoxExport QuestHint : public QuestItem
[1992]74    {
[2092]75
[2093]76        public:
[2092]77            QuestHint(BaseObject* creator);
[2093]78            virtual ~QuestHint();
[2092]79
[2261]80            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestHint object through XML.
[2092]81
[2261]82            bool isActive(const PlayerInfo* player) const; //!< Returns true if the QuestHint is active for the input player.
[2092]83
[2261]84            bool setActive(PlayerInfo* player); //!< Activates the QuestHint for the input player.
85            bool setQuest(Quest* quest); //!< Sets the Quest the QuestHint belongs to.
[2092]86
[2261]87            /**
88            @brief Returns the Quest the QuestHint is attached to.
89            @return  Returns a pointer to the Quest the QuestHint is attached to.
90            */
[2093]91            inline Quest* getQuest(void)
92               { return this->quest_; }
[2092]93
[2021]94        private:
[2261]95            Quest* quest_; //!< The Quest the QuestHint belongs to.
[2662]96            std::map<const PlayerInfo*, questHintStatus::Enum> playerStatus_; //!< List of the states for each player, with the Player-pointer as key.
[2092]97
[1992]98    };
99
100}
101
102#endif /* _QuestHint_H__ */
Note: See TracBrowser for help on using the repository browser.