Changeset 8208 in orxonox.OLD for branches/script_engine
- Timestamp:
- Jun 7, 2006, 6:42:28 PM (19 years ago)
- Location:
- branches/script_engine/src/lib/script_engine
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/src/lib/script_engine/script_manager.cc
r8206 r8208 44 44 } 45 45 46 void ScriptManager::reset() 47 { 48 //TODO: delete all scripts and triggers, empty lists. 49 50 51 52 } 46 53 47 54 void ScriptManager::init() -
branches/script_engine/src/lib/script_engine/script_manager.h
r8206 r8208 19 19 inline static ScriptManager* getInstance() { if (!ScriptManager::singletonRef)ScriptManager::singletonRef = new ScriptManager(); return ScriptManager::singletonRef; } 20 20 21 /// LOADING 21 22 virtual void loadParams(const TiXmlElement* root); 22 23 24 /// QUERRYING 23 25 Script* getScriptByFile(std::string& file); 24 26 25 27 26 28 27 29 private: 28 30 31 void reset(); //!< Resets the script manager 29 32 void init(); 30 33 void createScripts(const TiXmlElement* scripts); … … 36 39 static ScriptManager* singletonRef; //!< Reference to this class 37 40 38 const std::list<BaseObject*>* triggers; 41 const std::list<BaseObject*>* triggers; //!< A list of all the triggers in the world 39 42 40 const std::list<BaseObject*>* scripts; 43 const std::list<BaseObject*>* scripts; //!< A list of all the scripts in the world 41 44 42 45 -
branches/script_engine/src/lib/script_engine/script_trigger.cc
r8207 r8208 44 44 .defaultValues(""); 45 45 LoadParam(root, "triggerparent", this, ScriptTrigger, setTriggerParent) 46 .describe("The name of the target as it is in the *.oxw file")46 .describe("The name of the parent as it is in the *.oxw file") 47 47 .defaultValues(""); 48 48 -
branches/script_engine/src/lib/script_engine/script_trigger.h
r8207 r8208 19 19 20 20 21 /// 21 /// DO WORK 22 22 virtual void tick(float timestep); 23 23 virtual void executeAction(); 24 24 25 25 /// SET MEMBER 26 26 void setTarget(const std::string& targetName); 27 27 void setTarget(WorldEntity* target) { if(target!=NULL) this->target=target; } 28 29 28 void setTriggerParent(const std::string& name); 30 31 void set CallOnce(const bool call) { this->callOnce = call;}32 void set Radius(const float radius) { if(radius>0) this->radius = radius;}33 void set Delay(const float time){if(delay>0) this->delay = delay;}34 void set Script(const std::string& script){this->scriptFile = script;}35 void setFunction(const std::string& function){this->functionName = function;} 29 void setCallOnce(const bool call) { this->callOnce = call; } 30 void setRadius(const float radius) { if(radius>0) this->radius = radius; } 31 void setDelay(const float time){if(delay>0) this->delay = delay; } 32 void setScript(const std::string& script){ this->scriptFile = script; } 33 void setFunction(const std::string& function){ this->functionName = function; } 34 36 35 37 36 private: … … 44 43 std::string functionName; 45 44 46 45 //for internal use 47 46 bool scriptCalled; 48 47 bool callScript;
Note: See TracChangeset
for help on using the changeset viewer.