static int OnInit(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2) { LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject <LuaFramework.LuaBehaviour>(L, 1); UnityEngine.AssetBundle arg0 = (UnityEngine.AssetBundle)ToLua.CheckObject(L, 2, typeof(UnityEngine.AssetBundle)); obj.OnInit(arg0); return(0); } else if (count == 3) { LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject <LuaFramework.LuaBehaviour>(L, 1); UnityEngine.AssetBundle arg0 = (UnityEngine.AssetBundle)ToLua.CheckObject(L, 2, typeof(UnityEngine.AssetBundle)); string arg1 = ToLua.CheckString(L, 3); obj.OnInit(arg0, arg1); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.LuaBehaviour.OnInit")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static LuaBehaviour AddLuaScript(GameObject go, LuaTable luaTable) { LuaBehaviour obj = go.AddComponent <LuaBehaviour>(); obj.OnInit(luaTable); return(obj); }
static int RemoveEventDelegate(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2) { LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject <LuaFramework.LuaBehaviour>(L, 1); System.Collections.Generic.List <EventDelegate> arg0 = (System.Collections.Generic.List <EventDelegate>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.List <EventDelegate>)); obj.RemoveEventDelegate(arg0); return(0); } else if (count == 4) { LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject <LuaFramework.LuaBehaviour>(L, 1); System.Collections.Generic.List <EventDelegate> arg0 = (System.Collections.Generic.List <EventDelegate>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.List <EventDelegate>)); LuaTable arg1 = ToLua.CheckLuaTable(L, 3); LuaFunction arg2 = ToLua.CheckLuaFunction(L, 4); obj.RemoveEventDelegate(arg0, arg1, arg2); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.LuaBehaviour.RemoveEventDelegate")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public GameObject CreatePanelSync(int lua_id, string asset_name) { GameObject template = AppFacade.ResManager.GetRes <GameObject>(asset_name); GameObject go = GameObject.Instantiate(template) as GameObject; //go.name = asset_name; //go.layer = LayerMask.NameToLayer("Default"); go.transform.SetParent(Parent, false); LuaBehaviour behaviour = go.AddComponent <LuaBehaviour>(); behaviour.m_lua_id = lua_id; return(go); }
static int OnChangeSceneHide(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject <LuaFramework.LuaBehaviour>(L, 1); obj.OnChangeSceneHide(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int ClearClick(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaBehaviour)); obj.ClearClick(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int OnPointerClick(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject <LuaFramework.LuaBehaviour>(L, 1); UnityEngine.EventSystems.PointerEventData arg0 = (UnityEngine.EventSystems.PointerEventData)ToLua.CheckObject <UnityEngine.EventSystems.PointerEventData>(L, 2); obj.OnPointerClick(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int getLuaScript(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaBehaviour)); LuaInterface.LuaTable o = obj.getLuaScript(); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int RemoveClick(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject <LuaFramework.LuaBehaviour>(L, 1); FairyGUI.GComponent arg0 = (FairyGUI.GComponent)ToLua.CheckObject <FairyGUI.GComponent>(L, 2); obj.RemoveClick(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int setLuaScript(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaBehaviour)); LuaTable arg0 = ToLua.CheckLuaTable(L, 2); obj.setLuaScript(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int RemoveClick(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaBehaviour)); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.GameObject)); obj.RemoveClick(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int Init(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaBehaviour)); LuaTable arg0 = ToLua.CheckLuaTable(L, 2); FairyGUI.GObject arg1 = (FairyGUI.GObject)ToLua.CheckObject(L, 3, typeof(FairyGUI.GObject)); obj.Init(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetInputText(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaBehaviour)); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.GameObject)); string o = obj.GetInputText(arg0); LuaDLL.lua_pushstring(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int SetProgress(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaBehaviour)); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.GameObject)); float arg1 = (float)LuaDLL.luaL_checknumber(L, 3); obj.SetProgress(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int SetTextMesh(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaBehaviour)); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.GameObject)); string arg1 = ToLua.CheckString(L, 3); obj.SetTextMesh(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int AddScrollderbarValueChange(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject <LuaFramework.LuaBehaviour>(L, 1); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject)); LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3); obj.AddScrollderbarValueChange(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int checkButtonGo(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject <LuaFramework.LuaBehaviour>(L, 1); string arg0 = ToLua.CheckString(L, 2); bool o = obj.checkButtonGo(arg0); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int LoadAsset(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaBehaviour)); string arg0 = ToLua.CheckString(L, 2); UnityEngine.GameObject o = obj.LoadAsset(arg0); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int AddWidgetContainerChangeEvent(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaBehaviour)); UIWidgetContainer arg0 = (UIWidgetContainer)ToLua.CheckUnityObject(L, 2, typeof(UIWidgetContainer)); LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3); obj.AddWidgetContainerChangeEvent(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int OnInit(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaBehaviour)); UnityEngine.AssetBundle arg0 = (UnityEngine.AssetBundle)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.AssetBundle)); string arg1 = ToLua.CheckString(L, 3); obj.OnInit(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public void AddDragStart(GameObject go, LuaFunction luafunc) { if (go == null || luafunc == null) { return; } this.AddEventListener(go.name, "ondragstart", luafunc); UIEventListener.Get(go).onDragStart = delegate(GameObject o) { LuaBehaviour.ExtendEventDeal(go, "ondragstart"); luafunc.Call(new object[] { go }); }; }
static int AddToggleHandle(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaBehaviour)); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.GameObject)); LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3); obj.AddToggleHandle(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int AddLuaScript(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckUnityObject(L, 1, typeof(UnityEngine.GameObject)); LuaTable arg1 = ToLua.CheckLuaTable(L, 2); LuaFramework.LuaBehaviour o = LuaFramework.Util.AddLuaScript(arg0, arg1); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int AddClick(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaBehaviour)); FairyGUI.GObject arg0 = (FairyGUI.GObject)ToLua.CheckObject(L, 2, typeof(FairyGUI.GObject)); LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3); obj.AddClick(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_m_lua_id(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)o; int ret = obj.m_lua_id; LuaDLL.lua_pushinteger(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_lua_id on a nil value" : e.Message)); } }
public void AddKey(GameObject go, LuaFunction luafunc) { if (go == null || luafunc == null) { return; } this.AddEventListener(go.name, "onkey", luafunc); UIEventListener.Get(go).onKey = delegate(GameObject o, KeyCode key) { LuaBehaviour.ExtendEventDeal(go, "onkey"); luafunc.Call(new object[] { go, key }); }; }
public void AddPress(GameObject go, LuaFunction luafunc) { if (go == null || luafunc == null) { return; } this.AddEventListener(go.name, "onpress", luafunc); UIEventListener.Get(go).onPress = delegate(GameObject o, bool isPressed) { LuaBehaviour.ExtendEventDeal(go, "onpress"); luafunc.Call(new object[] { go, isPressed }); }; }
static int set_luaTableObject(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)o; LuaTable arg0 = ToLua.CheckLuaTable(L, 2); obj.luaTableObject = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index luaTableObject on a nil value" : e.Message)); } }
static int AddEventListener(IntPtr L) { try { ToLua.CheckArgsCount(L, 4); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)ToLua.CheckObject <LuaFramework.LuaBehaviour>(L, 1); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject)); LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3); string arg2 = ToLua.CheckString(L, 4); obj.AddEventListener(arg0, arg1, arg2); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int set_m_lua_id(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); LuaFramework.LuaBehaviour obj = (LuaFramework.LuaBehaviour)o; int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.m_lua_id = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_lua_id on a nil value" : e.Message)); } }