Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/ScriptableController_HS17/src/orxonox/scriptablecontroller/scriptable_controller.h @ 11535

Last change on this file since 11535 was 11519, checked in by kohlia, 7 years ago

See previous

File size: 984 bytes
Line 
1#ifndef SCRIPTABLE_CONTROLLER_H
2#define SCRIPTABLE_CONTROLLER_H
3
4#include <lua.hpp>
5#include <string>
6#include <list>
7#include <map>
8#include <memory>
9#include "scriptable_controller_api.h"
10#include "core/CoreIncludes.h"
11#include "worldentities/WorldEntity.h"
12#include "worldentities/ControllableEntity.h"
13
14struct lua_State;
15
16namespace orxonox
17{
18
19class ScriptableController
20{
21public:
22    int runScript(const std::string &file_path);
23
24    void registerWorldEntity(int id, WorldEntity *obj);
25    void registerControllableEntity(int id, ControllableEntity *obj);
26
27    WorldEntity *getWorldEntityByID(int id) const;
28    ControllableEntity *getControllableEntityByID(int id) const;
29
30private:
31    std::list<std::unique_ptr<ScriptableControllerAPI> > apis_;
32    ControllableEntity *player_; // TODO
33    std::map<int, WorldEntity*> worldEntities_;
34    std::map<int, ControllableEntity*> controllabelEntities_;
35
36    void printLuaError(lua_State *lua);
37};
38
39}
40
41#endif // SCRIPTABLE_CONTROLLER_H
Note: See TracBrowser for help on using the repository browser.