Changeset 8199 in orxonox.OLD for branches/script_engine
- Timestamp:
- Jun 7, 2006, 3:37:12 PM (19 years ago)
- Location:
- branches/script_engine/src/lib/script_engine
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/src/lib/script_engine/script.cc
r8197 r8199 24 24 if (root != NULL) 25 25 this->loadParams(root); 26 27 26 } 28 27 … … 37 36 void Script::loadParams(const TiXmlElement* root) 38 37 { 38 BaseObject::loadParams(root); 39 39 40 LOAD_PARAM_START_CYCLE(root, object); 40 41 { -
branches/script_engine/src/lib/script_engine/script_trigger.cc
r8178 r8199 16 16 void ScriptTrigger::loadParams(const TiXmlElement* root) 17 17 { 18 WorldEntity::loadParams(root); 19 18 20 /*{ LoadParam(root, "file", this, ScriptTrigger, setScript) 19 21 .describe("the fileName of the script, that should be triggered by this script trigger") … … 43 45 44 46 47 void ScriptTrigger::setTarget(const std::string& target) 48 { 49 BaseObject* targetEntity = ClassList::getObject(target, CL_WORLD_ENTITY); 50 51 if (targetEntity != NULL) 52 { 53 this->setTarget(dynamic_cast<WorldEntity*>(targetEntity)); 54 } 55 else 56 { 57 PRINTF(2)("Target %s for %s::%s does not Exist\n", taget.c_str(), this->getClassName(), this->getName()); 58 } 59 } 45 60 46 61 void ScriptTrigger::tick(float timestep) -
branches/script_engine/src/lib/script_engine/script_trigger.h
r8193 r8199 19 19 virtual void executeAction(); 20 20 21 void setTarget(WorldEntity* target){ if(target!=NULL) this->target=target;if(worldEntityIsParent)this->setParent(target);} 22 void setTargetName(std::string& name){this->targetName = name;} 21 22 void setTarget(const std::string& targetName); 23 24 void setTarget(WorldEntity* target) { if(target!=NULL) this->target=target;if(worldEntityIsParent)this->setParent(target); } 25 void setTargetName(std::string& name){ this->targetName = name; } 23 26 void setCallOnce(bool call) { this->callOnce = call;} 24 27 void setRadius(float radius) { if(radius>0) this->radius = radius;}
Note: See TracChangeset
for help on using the changeset viewer.