public abstract class JavaFunction
extends java.lang.Object
execute method. This execute
method is the method that will be called when you call the function from Lua.
To register the JavaFunction in Lua use the method register(String name).| 构造器和说明 |
|---|
JavaFunction(LuaState L)
Constructor that receives a LuaState.
|
protected LuaState L
public JavaFunction(LuaState L)
L - LuaState object associated with this JavaFunction objectpublic abstract int execute()
throws LuaException
getParam. A reference to the JavaFunctionWrapper itself is
always the first parameter received. Values passed back as results
of the function must be pushed onto the stack.LuaExceptionpublic LuaObject getParam(int idx)
this).idx - Index of the parameter.LuaObjectpublic void register(java.lang.String name)
throws LuaException
name - name of the function.LuaException