Changeset 8173 in orxonox.OLD for branches/script_engine/src/lib
- Timestamp:
- Jun 6, 2006, 9:34:13 AM (19 years ago)
- Location:
- branches/script_engine/src/lib/script_engine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/src/lib/script_engine/script_trigger.cc
r8172 r8173 5 5 { 6 6 scriptCalled = false; 7 callScript = false; 8 triggered = false; 7 9 } 8 10 … … 14 16 void ScriptTrigger::loadParams(const TiXmlElement* root) 15 17 { 16 /* LoadParam(root, "file", this, ScriptTrigger, setScript)18 /*{ LoadParam(root, "file", this, ScriptTrigger, setScript) 17 19 .describe("the fileName of the script, that should be triggered by this script trigger") 18 20 .defaultValues(""); … … 29 31 .describe("the delay after which the funtion sould be triggered") 30 32 .defaultValues(0); 31 */ 33 }*/ 34 timer = delay; 32 35 } 33 36 … … 36 39 void ScriptTrigger::tick(float timestep) 37 40 { 41 //if(triggered) 42 //{ 43 //timer -= timestep; 44 //if(timer < 0) 45 callScript = true; 46 //} 47 38 48 39 49 if((this->getAbsDirV()-target->getAbsDirV()).len() < radius) 40 50 { 41 if(!callOnce) 51 //triggered = true; 52 if(!callOnce && callScript) 42 53 { 43 54 executeAction(); 44 55 } 45 else if(callOnce && !scriptCalled )56 else if(callOnce && !scriptCalled && callScript) 46 57 { 47 58 executeAction(); -
branches/script_engine/src/lib/script_engine/script_trigger.h
r8172 r8173 36 36 std::string functionName; 37 37 38 bool callScript; 39 bool triggered; 40 float timer; 41 38 42 }; 39 43
Note: See TracChangeset
for help on using the changeset viewer.