static int _m_InvokeRepeating(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.MonoBehaviour __cl_gen_to_be_invoked = (UnityEngine.MonoBehaviour)translator.FastGetCSObj(L, 1); try { { string methodName = LuaAPI.lua_tostring(L, 2); float time = (float)LuaAPI.lua_tonumber(L, 3); float repeatRate = (float)LuaAPI.lua_tonumber(L, 4); __cl_gen_to_be_invoked.InvokeRepeating(methodName, time, repeatRate); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
internal static int LoadFromCustomLoaders(RealStatePtr L) { string filename = LuaAPI.lua_tostring(L, 1); LuaEnv self = ObjectTranslatorPool.Instance.Find(L).luaEnv; foreach (var loader in self.customLoaders) { string real_file_path = filename; byte[] bytes = loader(ref real_file_path); if (bytes != null) { if (LuaAPI.xluaL_loadbuffer(L, bytes, bytes.Length, "@" + real_file_path) != 0) { return(LuaAPI.luaL_error(L, String.Format("error loading module {0} from CustomLoader, {1}", LuaAPI.lua_tostring(L, 1), LuaAPI.lua_tostring(L, -1)))); } return(1); } } LuaAPI.lua_pushstring(L, string.Format( "\n\tno such file '{0}' in CustomLoaders!", filename)); return(1); }
static int _m_GetABReferencedCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ABManager gen_to_be_invoked = (ABManager)translator.FastGetCSObj(L, 1); { string _abName = LuaAPI.lua_tostring(L, 2); int gen_ret = gen_to_be_invoked.GetABReferencedCount(_abName); LuaAPI.xlua_pushinteger(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_ContainsKey(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DCET.Model.MultiMapSet <string, string> gen_to_be_invoked = (DCET.Model.MultiMapSet <string, string>)translator.FastGetCSObj(L, 1); { string _t = LuaAPI.lua_tostring(L, 2); bool gen_ret = gen_to_be_invoked.ContainsKey(_t); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_HasUIGroup(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityGameFramework.Runtime.UIComponent gen_to_be_invoked = (UnityGameFramework.Runtime.UIComponent)translator.FastGetCSObj(L, 1); { string _uiGroupName = LuaAPI.lua_tostring(L, 2); bool gen_ret = gen_to_be_invoked.HasUIGroup(_uiGroupName); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_UdpAuth(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Maria.Network.ClientSocket __cl_gen_to_be_invoked = (Maria.Network.ClientSocket)translator.FastGetCSObj(L, 1); try { { long session = LuaAPI.lua_toint64(L, 2); string ip = LuaAPI.lua_tostring(L, 3); int port = LuaAPI.xlua_tointeger(L, 4); __cl_gen_to_be_invoked.UdpAuth(session, ip, port); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_FindUIRes(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); LuaUIMgr gen_to_be_invoked = (LuaUIMgr)translator.FastGetCSObj(L, 1); { string _name = LuaAPI.lua_tostring(L, 2); var gen_ret = gen_to_be_invoked.FindUIRes(_name); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_RequestAssetBundleAsync(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); AssetBundles.AssetBundleManager gen_to_be_invoked = (AssetBundles.AssetBundleManager)translator.FastGetCSObj(L, 1); { string _assetbundleName = LuaAPI.lua_tostring(L, 2); AssetBundles.ResourceWebRequester gen_ret = gen_to_be_invoked.RequestAssetBundleAsync(_assetbundleName); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_LoadPrefab(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityMMO.ResMgr gen_to_be_invoked = (UnityMMO.ResMgr)translator.FastGetCSObj(L, 1); { string _path = LuaAPI.lua_tostring(L, 2); string _storePrefabName = LuaAPI.lua_tostring(L, 3); gen_to_be_invoked.LoadPrefab(_path, _storePrefabName); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_IsAssetLoaded(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); AssetBundles.AssetBundleManager gen_to_be_invoked = (AssetBundles.AssetBundleManager)translator.FastGetCSObj(L, 1); { string _assetName = LuaAPI.lua_tostring(L, 2); bool gen_ret = gen_to_be_invoked.IsAssetLoaded(_assetName); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_AddAssetCache(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); AssetBundles.AssetBundleManager gen_to_be_invoked = (AssetBundles.AssetBundleManager)translator.FastGetCSObj(L, 1); { string _assetName = LuaAPI.lua_tostring(L, 2); UnityEngine.Object _asset = (UnityEngine.Object)translator.GetObject(L, 3, typeof(UnityEngine.Object)); gen_to_be_invoked.AddAssetCache(_assetName, _asset); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_SetAssetBundleResident(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); AssetBundles.AssetBundleManager gen_to_be_invoked = (AssetBundles.AssetBundleManager)translator.FastGetCSObj(L, 1); { string _assetbundleName = LuaAPI.lua_tostring(L, 2); bool _resident = LuaAPI.lua_toboolean(L, 3); gen_to_be_invoked.SetAssetBundleResident(_assetbundleName, _resident); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string name = LuaAPI.lua_tostring(L, 2); UnityEngine.GameObject __cl_gen_ret = new UnityEngine.GameObject(name); translator.Push(L, __cl_gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 1) { UnityEngine.GameObject __cl_gen_ret = new UnityEngine.GameObject(); translator.Push(L, __cl_gen_ret); return(1); } if (LuaAPI.lua_gettop(L) >= 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 3) || translator.Assignable <System.Type>(L, 3))) { string name = LuaAPI.lua_tostring(L, 2); System.Type[] components = translator.GetParams <System.Type>(L, 3); UnityEngine.GameObject __cl_gen_ret = new UnityEngine.GameObject(name, components); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.GameObject constructor!")); }
static int _m_CompareTag(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.GameObject __cl_gen_to_be_invoked = (UnityEngine.GameObject)translator.FastGetCSObj(L, 1); { string tag = LuaAPI.lua_tostring(L, 2); bool __cl_gen_ret = __cl_gen_to_be_invoked.CompareTag(tag); LuaAPI.lua_pushboolean(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_GetTextInfo(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TextMeshProUGUI gen_to_be_invoked = (TMPro.TextMeshProUGUI)translator.FastGetCSObj(L, 1); { string _text = LuaAPI.lua_tostring(L, 2); TMPro.TMP_TextInfo gen_ret = gen_to_be_invoked.GetTextInfo(_text); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_GetPrefab(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityMMO.ResMgr gen_to_be_invoked = (UnityMMO.ResMgr)translator.FastGetCSObj(L, 1); { string _name = LuaAPI.lua_tostring(L, 2); UnityEngine.GameObject gen_ret = gen_to_be_invoked.GetPrefab(_name); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_Auth(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Maria.Network.ClientSocket __cl_gen_to_be_invoked = (Maria.Network.ClientSocket)translator.FastGetCSObj(L, 1); try { { string ipstr = LuaAPI.lua_tostring(L, 2); int pt = LuaAPI.xlua_tointeger(L, 3); Maria.User u = (Maria.User)translator.GetObject(L, 4, typeof(Maria.User)); __cl_gen_to_be_invoked.Auth(ipstr, pt, u); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
public int __Gen_Delegate_Imp31(object p0, ref string p1) { #if THREAD_SAFE || HOTFIX_ENABLE lock (luaEnv.luaEnvLock) { #endif RealStatePtr L = luaEnv.rawL; int errFunc = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference); ObjectTranslator translator = luaEnv.translator; translator.PushAny(L, p0); LuaAPI.lua_pushstring(L, p1); PCall(L, 2, 2, errFunc); p1 = LuaAPI.lua_tostring(L, errFunc + 2); int __gen_ret = LuaAPI.xlua_tointeger(L, errFunc + 1); LuaAPI.lua_settop(L, errFunc - 1); return(__gen_ret); #if THREAD_SAFE || HOTFIX_ENABLE } #endif }
static int _m_ShowTooltips(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyGUI.GRoot gen_to_be_invoked = (FairyGUI.GRoot)translator.FastGetCSObj(L, 1); { string _msg = LuaAPI.lua_tostring(L, 2); gen_to_be_invoked.ShowTooltips( _msg); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_ConnectAsync(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DCET.Model.WChannel gen_to_be_invoked = (DCET.Model.WChannel)translator.FastGetCSObj(L, 1); { string _url = LuaAPI.lua_tostring(L, 2); DCET.Model.ETVoid gen_ret = gen_to_be_invoked.ConnectAsync(_url); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_Contains(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.AssetBundle gen_to_be_invoked = (UnityEngine.AssetBundle)translator.FastGetCSObj(L, 1); { string _name = LuaAPI.lua_tostring(L, 2); bool gen_ret = gen_to_be_invoked.Contains(_name); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_GetChild(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyGUI.Container gen_to_be_invoked = (FairyGUI.Container)translator.FastGetCSObj(L, 1); { string _name = LuaAPI.lua_tostring(L, 2); FairyGUI.DisplayObject gen_ret = gen_to_be_invoked.GetChild(_name); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_Add(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DCET.Model.MultiMapSet <string, string> gen_to_be_invoked = (DCET.Model.MultiMapSet <string, string>)translator.FastGetCSObj(L, 1); { string _t = LuaAPI.lua_tostring(L, 2); string _k = LuaAPI.lua_tostring(L, 3); gen_to_be_invoked.Add(_t, _k); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_DoString(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); YY.LuaManager gen_to_be_invoked = (YY.LuaManager)translator.FastGetCSObj(L, 1); { string _luaString = LuaAPI.lua_tostring(L, 2); object[] gen_ret = gen_to_be_invoked.DoString(_luaString); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_ContainsKey(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); LitJson.JsonData gen_to_be_invoked = (LitJson.JsonData)translator.FastGetCSObj(L, 1); { string _key = LuaAPI.lua_tostring(L, 2); bool gen_ret = gen_to_be_invoked.ContainsKey(_key); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_CallFunction(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); YY.LuaManager gen_to_be_invoked = (YY.LuaManager)translator.FastGetCSObj(L, 1); { string _funcName = LuaAPI.lua_tostring(L, 2); object[] _args = translator.GetParams <object>(L, 3); gen_to_be_invoked.CallFunction(_funcName, _args); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
public static int LoadAssembly(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { string assemblyName = LuaAPI.lua_tostring(L, 1); Assembly assembly = null; try { assembly = Assembly.Load(assemblyName); } catch (BadImageFormatException) { // The assemblyName was invalid. It is most likely a path. } if (assembly == null) { assembly = Assembly.Load(AssemblyName.GetAssemblyName(assemblyName)); } if (assembly != null && !translator.assemblies.Contains(assembly)) { translator.assemblies.Add(assembly); } } catch (Exception e) { return(LuaAPI.luaL_error(L, "LoadAssembly catch a exception: " + e + ",stack:" + e.StackTrace)); } return(0); }
static int _m_GetHtmlElement(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyGUI.RichTextField gen_to_be_invoked = (FairyGUI.RichTextField)translator.FastGetCSObj(L, 1); { string _name = LuaAPI.lua_tostring(L, 2); FairyGUI.Utils.HtmlElement gen_ret = gen_to_be_invoked.GetHtmlElement(_name); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_LoadAsset(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ABManager gen_to_be_invoked = (ABManager)translator.FastGetCSObj(L, 1); { string _fullPath = LuaAPI.lua_tostring(L, 2); AssetItem gen_ret = gen_to_be_invoked.LoadAsset(_fullPath); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_Invoke(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.MonoBehaviour gen_to_be_invoked = (UnityEngine.MonoBehaviour)translator.FastGetCSObj(L, 1); { string _methodName = LuaAPI.lua_tostring(L, 2); float _time = (float)LuaAPI.lua_tonumber(L, 3); gen_to_be_invoked.Invoke(_methodName, _time); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }