summary refs log tree commit diff stats
path: root/src/systems/scripting.h
blob: d5380f197ec371c6556c7b4b47248c0944b519c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef AUTOMATING_H_E6E5D76E
#define AUTOMATING_H_E6E5D76E

#include "system.h"
#include <sol.hpp>

class ScriptingSystem : public System {
public:

  ScriptingSystem(Game& game);

  void tick(double dt);

  void killScript(id_type entity);

  id_type runBehaviorScript(id_type entity);

  void onTouch(id_type entity, id_type player);

private:

  template <typename... Args>
  id_type runScript(std::string event, id_type entity, Args&&... args);

  sol::state engine;
};

#endif /* end of include guard: AUTOMATING_H_E6E5D76E */