Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 11, 2009, 12:27:38 AM (15 years ago)
Author:
landauf
Message:

Reduced dependencies between orxonox and overlays: GUIOverlays send their owners to a map in the QuestManager instead of the QuestManager asking the GUIOverlays.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/libraries/src/orxonox/objects/quest/QuestManager.h

    r3370 r5617  
    9292            QuestContainer* getQuestTree(std::string & name); // tolua_export
    9393
     94            inline void setPlayer(const std::string& guiname, PlayerInfo* player)
     95                { this->players_[guiname] = player; }
     96            inline PlayerInfo* getPlayer(const std::string& guiname) const
     97                { std::map<std::string, PlayerInfo*>::const_iterator it = this->players_.find(guiname); return (it != this->players_.end()) ? it->second : 0; }
     98
    9499        private:
    95100            static QuestManager* singletonPtr_s;
     
    97102            std::map<std::string, Quest*> questMap_; //!< All Quests registered by their id's.
    98103            std::map<std::string, QuestHint*> hintMap_; //!< All QuestHints registered by their id's.
     104            std::map<std::string, PlayerInfo*> players_; //!< Stores the player (owner) for each gui
    99105
    100106            void getRootQuests(const PlayerInfo* player, std::list<Quest*> & list);
Note: See TracChangeset for help on using the changeset viewer.