public static void RegisterToLua(LuaState lua, Type type) { lua_ = lua; string[] funcList = new string[] { "HashEncrypt", "DeleteFile", "DeleteAllGameObject", "HideAllCam", "NotificationMessage", "CleanNotification", "NotificationMessageAddSeconds" }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { HashEncrypt, DeleteFile, DeleteAllGameObject, HideAllCam, NotificationMessage, CleanNotification, NotificationMessageAddSeconds, }; LuaWrapper.RegisterToLua(lua, type, funcList, funcDeList); }
public static void RegisterToLua(LuaState lua, Type type) { lua_ = lua; string[] funcList = new string[] { "AddChild", "AddChildWithPosition", "AddChildWithLocalPosition", "AddChildNotLose", "AddChildByResourcesPath", "AddChildNoBehaviour", "AddChildByResourcesPathNoBehaviour", "AddEffect", "AddEffectLocal", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { AddChild, AddChildWithPosition, AddChildWithLocalPosition, AddChildNotLose, AddChildByResourcesPath, AddChildNoBehaviour, AddChildByResourcesPathNoBehaviour, AddEffect, AddEffectLocal, }; LuaWrapper.RegisterToLua(lua, type, funcList, funcDeList); }
public static void RegisterToLua(LuaState lua, Type type) { lua_ = lua; string[] funcList = new string[] { "Create", "Vector3", "GetMagnitude", "Normalize", "x", "y", "z", "Equal", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { Create, Vector3, GetMagnitude, Normalize, x, y, z, Equal, }; LuaWrapper.RegisterToLua(lua, type, funcList, funcDeList); }
public static void RegisterToLua(LuaState lua, Type type) { lua_ = lua; string[] funcList = new string[] { "Create", "Euler", "Identity", "x", "y", "z", "w", "Equal", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { Create, Euler, Identity, Equal, x, y, z, w, Equal, }; LuaWrapper.RegisterToLua(lua, type, funcList, funcDeList); }
public static void RegisterToLua(LuaState lua, Type type) { lua_ = lua; Net = new CNetWorkGlobal(); string[] funcList = new string[] { "IsConnected", "Connect", "DisConnect", "SendNetMessage", "Update", "SetSocketSendNoDeley", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { IsConnected, Connect, DisConnect, SendNetMessage, Update, SetSocketSendNoDeley, }; LuaWrapper.RegisterToLua(lua, type, funcList, funcDeList); }
public LuaState(IntPtr lua) { this.luaPtr = lua; globalLuaState = this; this.pfnPanic = LuaState.Lua_Panic; this.pfnDispatch = LuaState.Lua_DispatchFun; LuaAPI.lua_atpanic(this.luaPtr, this.pfnPanic); }
public LuaState(IntPtr lua) { this.m_lua = lua; m_GlobalState = this; this.m_pfnPanic = LuaState.Lua_Panic; this.m_pfnDispatch = LuaState.Lua_DispatchFun; LuaAPI.lua_atpanic(this.m_lua, this.m_pfnPanic); }
public static void RegisterToLua(LuaState lua, Type type) { lua_ = LuaInstance.instance.Get(); string[] funcList = new string[] { "logtest", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { logtest, }; LuaWrapper.RegisterToLua(lua, type, funcList, funcDeList); }
public static void RegisterToLua(LuaState lua, Type type) { lua_ = lua; string[] funcList = new string[] { "SetLuaTableField", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { SetLuaTableField, }; LuaWrapper.RegisterToLua(lua, type, funcList, funcDeList); }
public static void RegisterToLua(LuaState l) { lua = l; string[] funcList = new string[] { "AddTimer", "RemoveTimer", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { AddTimer, RemoveTimer, }; LuaRegister.RegisterToLua(l, "LuaTimerWheel", funcList, funcDeList); }
public static void RegisterToLua(LuaState lua) { LuaRegisterWrapper.lua = lua; string[] funcList = new string[] { "RegisterClass", "RegisterIngoreStatic", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { RegisterClass, RegisterIngoreStatic, }; LuaRegister.RegisterToLua(lua, "RegisterWrapper", funcList, funcDeList); }
public static void RegisterToLua(LuaState lua, Type type) { lua_ = lua; string[] funcList = new string[] { "Get", "Equal", "StringToColor", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { Get, Equal, StringToColor, }; LuaWrapper.RegisterToLua(lua, type, funcList, funcDeList); }
public void RegisterFuncByMethodInfo(String funcName, MethodInfo m, LuaAPI.lua_CFunction cfunc) { if (m == null) { return; // FIX add warnning } else { methods_.Add(m); paramters_.Add(m.GetParameters()); int a = LuaInstance.MergeInt(register_funtion_, classIndex); lua_.PushInteger(a); lua_.PushLuaClosure(cfunc, 1); lua_.SetField(-2, funcName); register_funtion_++; } }
public static void RegisterToLua(LuaState l) { lua = l; string[] funcList = new string[] { "Log", "LogError", "LogWarning", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { Log, LogError, LogWarning, }; LuaRegister.RegisterToLua(l, "DebugLogger", funcList, funcDeList); }
public static void RegisterToLua(LuaState lua, Type type) { lua_ = lua; string[] funcList = new string[] { "Get", "GetBySeconds", "GetServerSeconds", "GetWithTimeZone", "GetSecondsLeft", "GetByServerSeconds", "GetClientTimeByServerSeconds", "GetClientNowTime", "Ticks_197011", "Ticks_UtcNow", "Ticks_Now", "LongAdd", "LongSub", "LongMultiply", "LongDivide", "LongLess", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { Get, GetBySeconds, GetServerSeconds, GetWithTimeZone, GetSecondsLeft, GetByServerSeconds, GetClientTimeByServerSeconds, GetClientNowTime, Ticks_197011, Ticks_UtcNow, Ticks_Now, LongAdd, LongSub, LongMultiply, LongDivide, LongLess, }; LuaWrapper.RegisterToLua(lua, type, funcList, funcDeList); }
public static void RegisterToLua(LuaState lua, Type type) { lua_ = lua; string[] funcList = new string[] { "Get", "GetByParams", "GetByComplexParams", "IsSameType", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { Get, GetByParams, GetByComplexParams, IsSameType, }; LuaWrapper.RegisterToLua(lua, type, funcList, funcDeList); }
public static void RegisterToLua(LuaState lua, Type type) { lua_ = lua; string[] funcList = new string[] { "Log", "LogError", "Log3Error", "LogLong", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { Log, LogError, Log3Error, LogLong, }; LuaWrapper.RegisterToLua(lua, type, funcList, funcDeList); }
public static void RegisterToLua(LuaState lua, Type type) { lua_ = lua; string[] funcList = new string[] { "ShowLong", "ShowLableWithLong", "ToString", "GetDataLong", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { ShowLong, ShowLableWithLong, ToString, GetDataLong, }; LuaWrapper.RegisterToLua(lua, type, funcList, funcDeList); }
private void RegisterField() { fields = registerType.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.Static); if (fields == null) { return; } else { LuaAPI.lua_CFunction cfunc = LuaInstance.SetField; for (int i = 0; i < fields.Length; i++) { int a = LuaInstance.MergeInt(fieldIndex, classIndex); lua.PushInteger(a); lua.PushLuaClosure(cfunc, 1); lua.SetField(-2, fields[i].Name); fieldIndex++; } } }
public void RegisterField() { fields_ = register_type_.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.Static); if (fields_ == null) { return; // FIX add warnning } else { LuaAPI.lua_CFunction cfunc = LuaInstance.SetField; for (int i = 0; i < fields_.Length; i++) { int a = LuaInstance.MergeInt(field_index_, classIndex); lua_.PushInteger(a); lua_.PushLuaClosure(cfunc, 1); lua_.SetField(-2, fields_[i].Name); field_index_++; } } }
public void PushLuaClosure(LuaAPI.lua_CFunction func, int n) { LuaAPI.lua_pushcclosure(this.luaPtr, func, n); }
public void RegisterFunc(string funcName, LuaAPI.lua_CFunction func, int paraNum) { lua_.PushLuaClosure(func, paraNum); lua_.SetGlobal(funcName); }