完善脚本引擎
This commit is contained in:
parent
58ef5f9e7d
commit
915003be08
@ -7,7 +7,11 @@
|
|||||||
void ScriptEngine::Init()
|
void ScriptEngine::Init()
|
||||||
{
|
{
|
||||||
engine_ = new a8::PyEngine();
|
engine_ = new a8::PyEngine();
|
||||||
engine_->work_path = "pyscript/";
|
if (getenv("machine_type")) {
|
||||||
|
engine_->work_path = "/data/conf_test/game1008/res/pyscripts/";
|
||||||
|
} else {
|
||||||
|
engine_->work_path = "../res/pyscripts/";
|
||||||
|
}
|
||||||
engine_->Init();
|
engine_->Init();
|
||||||
if (!engine_->IsInitialized()) {
|
if (!engine_->IsInitialized()) {
|
||||||
abort();
|
abort();
|
||||||
|
@ -24,7 +24,7 @@ class ScriptEngine : public a8::Singleton<ScriptEngine>
|
|||||||
const char* func_name,
|
const char* func_name,
|
||||||
std::initializer_list<a8::XValue> args);
|
std::initializer_list<a8::XValue> args);
|
||||||
|
|
||||||
private:
|
public:
|
||||||
a8::PyEngine *engine_ = nullptr;
|
a8::PyEngine *engine_ = nullptr;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include "framework/cpp/utils.h"
|
#include "framework/cpp/utils.h"
|
||||||
|
|
||||||
|
|
||||||
bool ReadCsvMetaFile(const std::string& filename,
|
bool ReadCsvMetaFile(const std::string& filename,
|
||||||
google::protobuf::Message* prototype,
|
google::protobuf::Message* prototype,
|
||||||
std::function<void (google::protobuf::Message*)> push_back_func)
|
std::function<void (google::protobuf::Message*)> push_back_func)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user