Changeset 7462 in orxonox.OLD for trunk/src/util
- Timestamp:
- May 1, 2006, 3:21:40 PM (19 years ago)
- Location:
- trunk/src/util
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/game_rules.cc
r7461 r7462 47 47 BaseObject::loadParams(root); 48 48 49 PRINTF(0)("GameRules::loadParams(...) hit me\n"); 49 50 LoadParamXML(root, "MissionGoal", this, GameRules, loadMissionGoal) 50 51 .describe("an XML-Element to load the missions from"); … … 55 56 void GameRules::loadMissionGoal(const TiXmlElement* root) 56 57 { 58 PRINTF(0)("Trying to load MissionGoals\n"); 57 59 const TiXmlElement* element = root->FirstChildElement(); 58 60 while( element != NULL) … … 61 63 PRINTF(2)("Adding Mission Goal:%s\n", element->Value()); 62 64 BaseObject* created = Factory::fabricate(element); 63 if (created != NULL && created->isA(CL_GAME_RULES))65 if (created != NULL /*&& created->isA(CL_GAME_RULES)*/) 64 66 { 65 67 MissionGoal* mg = dynamic_cast<MissionGoal*>(created); -
trunk/src/util/kill_target.cc
r7461 r7462 18 18 #include "kill_target.h" 19 19 20 #include "util/loading/factory.h" 21 20 22 using namespace std; 23 24 CREATE_FACTORY(KillTarget, CL_KILL_TARGET); 21 25 22 26 … … 29 33 { 30 34 this->setClassID(CL_KILL_TARGET, "KillTarget"); 31 32 PRINTF(0)("Created a KillTarget Mission Goal <==================================\n");33 35 34 36 if( root != NULL) … … 49 51 { 50 52 MissionGoal::loadParams(root); 53 54 // LoadParam(root, "death-penalty-timeout", this, SingleplayerShootemup, setDeathPenaltyTimeout) 55 // .describe("sets the time in seconds a player has to wait for respawn"); 51 56 } 52 57 … … 54 59 MissionState KillTarget::checkMissionGoal() 55 60 {} 61 -
trunk/src/util/kill_target.h
r7461 r7462 15 15 16 16 //! A class representing a mission goal to kill a specific amount of a specific object type 17 class KillTarget : public MissionGoal { 17 class KillTarget : public MissionGoal 18 { 18 19 19 public:20 KillTarget(const TiXmlElement* root);21 virtual ~KillTarget();20 public: 21 KillTarget(const TiXmlElement* root); 22 virtual ~KillTarget(); 22 23 23 virtual void loadParams(const TiXmlElement* root); 24 25 virtual MissionState checkMissionGoal(); 24 virtual void loadParams(const TiXmlElement* root); 26 25 27 26 28 protected: 27 void setNumberOfKills( int kills) { this->numberOfKills = kills; } 28 void setTartetClassID( int classID) { this->targetClassID = classID; } 29 29 30 31 virtual MissionState checkMissionGoal(); 32 33 34 private: 35 int numberOfKills; //!< the amount of kills of this kind 36 int targetClassID; //!< id of the target class 30 37 }; 31 38 -
trunk/src/util/singleplayer_shootemup.cc
r7461 r7462 41 41 42 42 43 43 44 /** 44 45 * constructor … … 48 49 { 49 50 this->setClassID(CL_SINGLEPLAYER_SHOOTEMUP, "SingleplayerShootemup"); 50 51 PRINTF(0)("Created a SinglePlayer Shootemup game\n");52 51 53 52 if( root != NULL)
Note: See TracChangeset
for help on using the changeset viewer.