Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

Continued working on script manager

File size: 890 bytes
Line 
1#ifndef _SCRIPT_MANAGER_H
2#define _SCRIPT_MNAGER_H
3
4#include <list>
5#include <string>
6
7#include "script.h"
8#include "base_object.h"
9#include "luaincl.h"
10#include "loading/load_param.h"
11
12
13//!< Contains the names of all objects in a world and a list of all script files that need the object.
14struct worldObject
15{
16  std::string name;
17  std::list<std::string> scriptFiles;
18};
19
20class ScriptManager //: public BaseObject
21{
22 public:
23   ScriptManager(std::string& world);
24  virtual ~ScriptManager();
25
26  virtual void loadParams(const TiXmlElement* root);
27
28  virtual void tick(float timestep);
29
30  void changeWorld(std::string& newWorld);
31
32
33  void initScripts(); // initializes all scripts
34
35 private:
36   void  init(std::string& world);
37
38   std::list<scriptableObject> objectList; //!< The list of all Objects in a world (read from the *.oxw file of the world)
39   std::string currentWorld;
40
41
42};
43#endif
Note: See TracBrowser for help on using the repository browser.