Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/script_engine/src/lib/script_engine/script_manager.h @ 8193

Last change on this file since 8193 was 8193, checked in by snellen, 18 years ago

script_engine: swapping to integrate into the ORXONOX framework

File size: 1014 bytes
RevLine 
[8085]1#ifndef _SCRIPT_MANAGER_H
[8170]2#define _SCRIPT_MANAGER_H
[8085]3
[8131]4#include <list>
[8085]5#include <string>
[8093]6
[8131]7#include "script.h"
[8085]8#include "base_object.h"
9#include "luaincl.h"
[8093]10#include "loading/load_param.h"
[8085]11
12
[8193]13class ScriptTrigger;
14class Scriptable;
[8085]15
[8163]16class ScriptManager : public BaseObject
[8085]17{
18 public:
[8139]19   ScriptManager();
[8136]20   ~ScriptManager();
[8085]21
[8193]22  inline static ScriptManager* getInstance() { if (!ScriptManager::singletonRef)ScriptManager::singletonRef = new ScriptManager(); return ScriptManager::singletonRef; }
[8138]23
[8155]24  virtual void loadParams(const TiXmlElement* root);
[8085]25
[8137]26  void tick(float timestep);
[8085]27
[8171]28  Script* getScriptByFile(std::string& file);
[8131]29
[8193]30
31 
[8085]32 private:
[8138]33
[8155]34   void  init();
[8157]35   void  createScriptList(const TiXmlElement* scripts);
[8164]36   void  addObjectToScript(const std::string object);
[8085]37
38
[8193]39   static ScriptManager*             singletonRef;   //!< Reference to this class
[8131]40
[8193]41   const std::list<BaseObject*>*     triggerList;
[8155]42
[8193]43   const std::list<BaseObject*>*     scriptableClasses;
44   const std::list<BaseObject*>*     scripts;
[8155]45
46
[8085]47};
48#endif
Note: See TracBrowser for help on using the repository browser.