Changeset 7463 in orxonox.OLD for trunk/src/util
- Timestamp:
- May 1, 2006, 4:03:01 PM (19 years ago)
- Location:
- trunk/src/util
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/kill_target.cc
r7462 r7463 19 19 20 20 #include "util/loading/factory.h" 21 #include "util/loading/load_param.h" 21 22 22 23 using namespace std; … … 52 53 MissionGoal::loadParams(root); 53 54 54 // LoadParam(root, "death-penalty-timeout", this, SingleplayerShootemup, setDeathPenaltyTimeout) 55 // .describe("sets the time in seconds a player has to wait for respawn"); 55 LoadParam(root, "numberofkills", this, KillTarget, setNumberOfKills) 56 .describe("sets the number of kills a target has to be killed"); 57 LoadParam(root, "targetclassid", this, KillTarget, setTargetClassID) 58 .describe("sets the targets class id"); 56 59 } 57 60 -
trunk/src/util/kill_target.h
r7462 r7463 26 26 27 27 void setNumberOfKills( int kills) { this->numberOfKills = kills; } 28 void setTartetClassID( int classID) { this->targetClassID = classID; } 28 void setTargetClassID( int classID) { this->targetClassID = classID; } 29 void setTargetClassName( char* className) {} 29 30 30 31 -
trunk/src/util/mission_goal.cc
r7461 r7463 17 17 18 18 #include "mission_goal.h" 19 20 #include "util/loading/load_param.h" 19 21 20 22 using namespace std; … … 42 44 } 43 45 44 46 /** 47 * loading parameter function: more help on the wiki pages 48 */ 45 49 void MissionGoal::loadParams(const TiXmlElement* root) 46 50 { 47 51 BaseObject::loadParams(root); 52 53 LoadParam(root, "title", this, MissionGoal, setMissionName) 54 .describe("sets the title of the mission"); 55 LoadParam(root, "description", this, MissionGoal, setMissionDescription) 56 .describe("sets the mission description"); 48 57 } 58 -
trunk/src/util/mission_goal.h
r7461 r7463 32 32 virtual void loadParams(const TiXmlElement* root); 33 33 34 /** sets the mission name @param missionName: the string containig the mission title */ 35 inline void setMissionName(const std::string& missionName) { this->missionName = missionName; } 36 /** @return the mission title */ 37 inline std::string getMissionName() { return this->missionName; } 38 34 39 /** sets the mission description @param descrtiption: the string containing the description */ 35 inline void setMissionDescription( std::stringdescription) { this->missionDescription = description; }40 inline void setMissionDescription(const std::string& description) { this->missionDescription = description; } 36 41 /** gets the mission description @returns the string containing the description */ 37 42 inline std::string getMissionDescription() { return this->missionDescription; } 43 44 /** sets the mission state @param missionState state of the mission*/ 45 inline void setMissionState(MissionState state) { this->missionState = state; } 46 /** @returns the current mission state */ 47 inline MissionState getMissionState() { return this->missionState; } 38 48 39 49 virtual MissionState checkMissionGoal() = 0; … … 41 51 42 52 protected: 53 std::string missionName; //!< the title of the mission 43 54 // perhaps there will be more than one description soon: a long and short version for different parsts in the gui 44 55 std::string missionDescription; //!< the text description of the mission
Note: See TracChangeset
for help on using the changeset viewer.