org.keplerproject.luajava.LuaStateFactory Java Examples

The following examples show how to use org.keplerproject.luajava.LuaStateFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LuaScriptInvoker.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public void invokeScript(String script){
	LuaState luaState = LuaStateFactory.newLuaState();
	luaState.openLibs();
	this.initLuaContext(luaState);
	int error = luaState.LdoString(script);
	if(error!=0){
		Logger.log("Read/Parse lua error. Exit");
		return;
	}
	
	luaState.close();
}
 
Example #2
Source File: LuaScriptInvoker.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public void invokeFileScript(String scriptFilePath){
	LuaState luaState = LuaStateFactory.newLuaState();
	luaState.openLibs();
	this.initLuaContext(luaState);
	int error = luaState.LdoFile(scriptFilePath);
	if(error!=0){
		Logger.log("Read/Parse lua error. Exit");
		return;
	}
	luaState.close();
}
 
Example #3
Source File: LuaScriptInvoker.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
public void invokeScript(String script){
	LuaState luaState = LuaStateFactory.newLuaState();
	luaState.openLibs();
	this.initLuaContext(luaState);
	int error = luaState.LdoString(script);
	if(error!=0){
		Logger.log("Read/Parse lua error. Exit");
		return;
	}
	
	luaState.close();
}
 
Example #4
Source File: LuaScriptInvoker.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
public void invokeFileScript(String scriptFilePath){
	LuaState luaState = LuaStateFactory.newLuaState();
	luaState.openLibs();
	this.initLuaContext(luaState);
	int error = luaState.LdoFile(scriptFilePath);
	if(error!=0){
		Logger.log("Read/Parse lua error. Exit");
		return;
	}
	luaState.close();
}
 
Example #5
Source File: LuaScriptInvoker.java    From AppTroy with Apache License 2.0 5 votes vote down vote up
public void invokeScript(String script){
    LuaState luaState = LuaStateFactory.newLuaState();
    luaState.openLibs();
    this.initLuaContext(luaState);
    int error = luaState.LdoString(script);
    if(error!=0){
        Logger.log("Read/Parse lua error. Exit");
        return;
    }

    luaState.close();
}
 
Example #6
Source File: LuaScriptInvoker.java    From AppTroy with Apache License 2.0 5 votes vote down vote up
public void invokeFileScript(String scriptFilePath){
    LuaState luaState = LuaStateFactory.newLuaState();
    luaState.openLibs();
    this.initLuaContext(luaState);
    int error = luaState.LdoFile(scriptFilePath);
    if(error!=0){
        Logger.log("Read/Parse lua error. Exit");
        return;
    }
    luaState.close();
}
 
Example #7
Source File: LuaScriptInvoker.java    From HeyGirl with Apache License 2.0 5 votes vote down vote up
public void invokeScript(String script){
	LuaState luaState = LuaStateFactory.newLuaState();
	luaState.openLibs();
	this.initLuaContext(luaState);
	int error = luaState.LdoString(script);
	if(error!=0){
		Logger.log("Read/Parse lua error. Exit");
		return;
	}
	
	luaState.close();
}
 
Example #8
Source File: LuaScriptInvoker.java    From HeyGirl with Apache License 2.0 5 votes vote down vote up
public void invokeFileScript(String scriptFilePath){
	LuaState luaState = LuaStateFactory.newLuaState();
	luaState.openLibs();
	this.initLuaContext(luaState);
	int error = luaState.LdoFile(scriptFilePath);
	if(error!=0){
		Logger.log("Read/Parse lua error. Exit");
		return;
	}
	luaState.close();
}
 
Example #9
Source File: LuaManager.java    From MiBandDecompiled with Apache License 2.0 5 votes vote down vote up
public void resetLuaState()
{
    if (mLuaState != null)
    {
        mLuaState.close();
    }
    mLuaState = LuaStateFactory.newLuaState();
    mLuaState.openLibs();
    loadScriptFile();
}
 
Example #10
Source File: LuaScriptInvoker.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public void invokeScript(String script){
	LuaState luaState = LuaStateFactory.newLuaState();
	luaState.openLibs();
	this.initLuaContext(luaState);
	int error = luaState.LdoString(script);
	if(error!=0){
		Logger.log("Read/Parse lua error. Exit");
		return;
	}
	
	luaState.close();
}
 
Example #11
Source File: LuaScriptInvoker.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public void invokeFileScript(String scriptFilePath){
	LuaState luaState = LuaStateFactory.newLuaState();
	luaState.openLibs();
	this.initLuaContext(luaState);
	int error = luaState.LdoFile(scriptFilePath);
	if(error!=0){
		Logger.log("Read/Parse lua error. Exit");
		return;
	}
	luaState.close();
}