Changeset 8978 in orxonox.OLD for branches/single_player_map/src/world_entities
- Timestamp:
- Jul 1, 2006, 2:48:17 PM (19 years ago)
- Location:
- branches/single_player_map/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/world_entities/script_trigger.cc
r8894 r8978 14 14 */ 15 15 16 17 16 #include "script_trigger.h" 18 17 #include "class_list.h" … … 23 22 24 23 CREATE_SCRIPTABLE_CLASS(ScriptTrigger, CL_SCRIPT_TRIGGER, 25 addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor)) 26 ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX)) 27 ->addMethod("getAbsCoorY", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorY)) 28 ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ)) 24 //Position 25 addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor)) 26 ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX)) 27 ->addMethod("getAbsCoorY", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorY)) 28 ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ)) 29 //Set values 30 // ->addMethod("setTarget", ExecutorLua1<ScriptTrigger, std::string >(&ScriptTrigger::setTarget)) 31 // ->addMethod("setTriggerParent", ExecutorLua1<ScriptTrigger, std::string >(&ScriptTrigger::setTriggerParent)) 32 ->addMethod("setTriggerLasts", ExecutorLua1<ScriptTrigger, bool >(&ScriptTrigger::setTriggerLasts)) 33 ->addMethod("setInvert", ExecutorLua1<ScriptTrigger, bool >(&ScriptTrigger::setInvert)) 34 ->addMethod("setRadius", ExecutorLua1<ScriptTrigger, float >(&ScriptTrigger::setRadius)) 35 //->addMethod("setScript", ExecutorLua1<ScriptTrigger, std::string >(&ScriptTrigger::setScript)) 36 //->addMethod("setFunction", ExecutorLua1<ScriptTrigger, std::string >(&ScriptTrigger::setFunction)) 37 ->addMethod("setDebugDraw", ExecutorLua1<ScriptTrigger, bool >(&ScriptTrigger::setInvert)) 29 38 ); 30 39 … … 92 101 LoadParam(root, "radius", this, ScriptTrigger, setRadius) 93 102 .describe("the fileName of the script, that should be triggered by this script trigger") 94 .defaultValues(0);95 LoadParam(root, "delay", this, ScriptTrigger, setDelay)96 .describe("the delay after which the funtion sould be triggered")97 103 .defaultValues(0); 98 104 LoadParam(root, "worldentity", this, ScriptTrigger, setTarget) -
branches/single_player_map/src/world_entities/script_trigger.h
r8894 r8978 38 38 void setInvert(const bool inv) { this->invert = invert; } 39 39 void setRadius(const float radius) { if(radius>0) this->radius = radius; } 40 void setDelay(const float time){if(delay>0) this->delay = delay; }41 40 void setScript(const std::string& file); 42 41 void setFunction(const std::string& function){ this->functionName = function;}
Note: See TracChangeset
for help on using the changeset viewer.