- Timestamp:
- Apr 27, 2006, 4:34:21 PM (19 years ago)
- Location:
- trunk/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/game_rules.h
r7044 r7400 9 9 10 10 #include "base_object.h" 11 #include <vector> 11 12 12 13 … … 14 15 class ObjectManager; 15 16 class Player; 17 class MissionGoal; 16 18 17 19 … … 24 26 25 27 virtual void loadParams(const TiXmlElement* root = NULL); 28 29 30 /** adding an mission goal to the game rules @param missionGoal the mission goal to add */ 31 inline void addMissionGoal(MissionGoal* missionGoal) { this->missionList.push_back(missionGoal); } 26 32 27 33 … … 40 46 41 47 protected: 42 ObjectManager* pObjectManager; //!< reference to the current Object Manager 43 Player* localPlayer; //!< reference to the local player 48 ObjectManager* pObjectManager; //!< reference to the current Object Manager 49 Player* localPlayer; //!< reference to the local player 50 std::vector<MissionGoal*> missionList; //!< list of mission goals 44 51 }; 45 52 -
trunk/src/util/mission_goal.h
r7391 r7400 10 10 11 11 12 class TiXmlElement; 13 14 15 typedef enum MissionState 16 { 17 MS_ACCOMPLISHED = 0, 18 MS_RUNNING, 19 MS_FAILED, 20 21 MS_NUMBER 22 }; 12 23 13 24 … … 19 30 virtual ~MissionGoal(); 20 31 32 virtual void loadParams(const TiXmlElement* root); 21 33 22 private: 34 /** sets the mission description @param descrtiption: the string containing the description */ 35 inline void setMissionDescription(std::string description) { this->missionDescription = description; } 36 /** gets the mission description @returns the string containing the description */ 37 inline std::string getMissionDescription() { return this->missionDescription; } 38 39 virtual MissionState checkMissionGoal() = 0; 40 41 42 protected: 43 // perhaps there will be more than one description soon: a long and short version for different parsts in the gui 44 std::string missionDescription; //!< the text description of the mission 45 46 MissionState missionState; //!< the state of this mission 23 47 24 48 };
Note: See TracChangeset
for help on using the changeset viewer.