26 lines
422 B
C++
26 lines
422 B
C++
#pragma once
|
|
#include <string>
|
|
#include <memory>
|
|
|
|
namespace ZL {
|
|
|
|
class Game;
|
|
|
|
class ScriptEngine {
|
|
public:
|
|
ScriptEngine();
|
|
~ScriptEngine();
|
|
|
|
// Must be called once, after the Game's NPCs are ready.
|
|
void init(Game* game);
|
|
|
|
// Execute a Lua script file. Logs errors to stderr.
|
|
void runScript(const std::string& path);
|
|
|
|
private:
|
|
struct Impl;
|
|
std::unique_ptr<Impl> impl;
|
|
};
|
|
|
|
} // namespace ZL
|