Changeset 8304 in orxonox.OLD for branches/script_engine/src/world_entities/script_trigger.cc
- Timestamp:
- Jun 10, 2006, 8:51:17 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/src/world_entities/script_trigger.cc
r8289 r8304 6 6 7 7 #include "state.h" 8 9 10 8 9 10 11 11 ScriptTrigger::ScriptTrigger(const TiXmlElement* root) 12 12 { 13 13 this->setClassID(CL_SCRIPT_TRIGGER, "ScriptTrigger"); 14 14 this->toList(OM_COMMON); 15 15 16 debugDraw = false; 16 17 scriptCalled = false; 17 18 scriptIsOk = false; … … 55 56 .describe("True if the script shoul only be called once") 56 57 .defaultValues(""); 58 LoadParam(root, "debugdraw", this, ScriptTrigger, setDebugDraw) 59 .describe("True if the script shoul only be called once") 60 .defaultValues(""); 57 61 } 58 62 … … 91 95 void ScriptTrigger::tick(float timestep) 92 96 { 93 97 94 98 if( this->distance(target) < radius) 95 99 { … … 125 129 void ScriptTrigger::setScript(const std::string& file) 126 130 { 127 131 128 132 ScriptManager* scriptManager = State::getScriptManager(); 129 133 if (scriptManager != NULL) 130 134 { 131 135 132 136 script = scriptManager->getScriptByFile(file); 133 137 if(script != NULL)
Note: See TracChangeset
for help on using the changeset viewer.