Last change
on this file since 7422 was
7400,
checked in by patrick, 19 years ago
|
worked on game rules and mission goals
|
File size:
1.2 KB
|
Rev | Line | |
---|
[7391] | 1 | /*! |
---|
| 2 | * @file mission_goal.h |
---|
| 3 | * @brief General definition of mission goals |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #ifndef _MISSION_GOAL_H |
---|
| 7 | #define _MISSION_GOAL_H |
---|
| 8 | |
---|
| 9 | #include "base_object.h" |
---|
| 10 | |
---|
| 11 | |
---|
[7400] | 12 | class TiXmlElement; |
---|
[7391] | 13 | |
---|
| 14 | |
---|
[7400] | 15 | typedef enum MissionState |
---|
| 16 | { |
---|
| 17 | MS_ACCOMPLISHED = 0, |
---|
| 18 | MS_RUNNING, |
---|
| 19 | MS_FAILED, |
---|
| 20 | |
---|
| 21 | MS_NUMBER |
---|
| 22 | }; |
---|
| 23 | |
---|
| 24 | |
---|
[7391] | 25 | //! A class representing a mission goal |
---|
| 26 | class MissionGoal : public BaseObject { |
---|
| 27 | |
---|
| 28 | public: |
---|
| 29 | MissionGoal(); |
---|
| 30 | virtual ~MissionGoal(); |
---|
| 31 | |
---|
[7400] | 32 | virtual void loadParams(const TiXmlElement* root); |
---|
[7391] | 33 | |
---|
[7400] | 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; } |
---|
[7391] | 38 | |
---|
[7400] | 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 |
---|
| 47 | |
---|
[7391] | 48 | }; |
---|
| 49 | |
---|
| 50 | #endif /* _MISSION_GOAL_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.