forked from mirrors/kolyah35-minecraft-pe-0.6.1
begin
This commit is contained in:
parent
f7ad5acd33
commit
6f1ca8fc3b
7 changed files with 104 additions and 9 deletions
20
src/plugins/PluginsManager.hpp
Normal file
20
src/plugins/PluginsManager.hpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
#include <unordered_map>
|
||||
#include <sol/sol.hpp>
|
||||
#include <vector>
|
||||
|
||||
class Level;
|
||||
|
||||
class PluginsManager {
|
||||
public:
|
||||
PluginsManager(Level& level);
|
||||
|
||||
void registerTypes();
|
||||
|
||||
void subscribe(std::string event, sol::function function);
|
||||
private:
|
||||
std::unordered_map<std::string, std::vector<sol::function>> m_callbacks;
|
||||
|
||||
sol::state m_lua;
|
||||
Level& m_level;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue