Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 5, 2006, 3:47:10 PM (19 years ago)
Author:
snellen
Message:

this won't compile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/script_engine/src/lib/script_engine/script_manager.h

    r8139 r8155  
    1111
    1212
    13 //!< Contains the names of all objects in a world and a list of all script files that need the object.
    14 struct worldObject
     13//!< Contains the name of a lua script file  and a list of all objects that the script needs
     14struct LuaScript
    1515{
    1616  std::string name;
    17   std::list<std::string> scriptFiles;
     17  std::list<std::string> objectList;
     18  Script script;
    1819};
    1920
     
    2223 public:
    2324   ScriptManager();
    24    ScriptManager(std::string& world);
    2525   ~ScriptManager();
    2626
    27    inline static ScriptManager* getInstance();
     27  inline static ScriptManager* getInstance();
    2828
    29   void loadParams(const TiXmlElement* root);
     29  virtual void loadParams(const TiXmlElement* root);
     30  void setWorld(std::string& world){currentWorld = world;}
    3031
    3132  void tick(float timestep);
    32 
    33   void changeWorld(std::string& newWorld);
    34 
    3533
    3634  void initScripts(); // initializes all scripts
     
    3836 private:
    3937
    40    void  init(std::string& world);
     38   void  init();
     39   void  createScriptList(TiXmlElement* scripts);
     40   void  setCurrentScriptFile(std::string& file);
     41   void  addObjectToScript(std::string& object, LuaScript& script);
    4142
    42    static ScriptManager*      singletonRef; //!< Reference to this class
    43    std::list<worldObject> objectList; //!< The list of all Objects in a world (read from the *.oxw file of the world)
    44    std::string currentWorld;
     43   bool fileIsInScriptList(std::string& file);
     44   bool objectIsInObjectList(std::string& object,const LuaScript& script);
     45
     46
     47   static ScriptManager*      singletonRef;   //!< Reference to this class
     48   std::list<LuaScript>       scriptList;     //!< The list of all scripts that the current world needs
     49   std::string                currentWorld;
     50   LuaScript                  currentScript;  //!< For temorary use
     51
    4552
    4653
Note: See TracChangeset for help on using the changeset viewer.