static int Get(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject))) { UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.ToObject(L, 1); LuaInterface.LuaTable o = LuaBindSceneObj.Get(arg0); ToLua.Push(L, o); return(1); } else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(LuaInterface.LuaTable))) { UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.ToObject(L, 1); LuaTable arg1 = ToLua.ToLuaTable(L, 2); LuaInterface.LuaTable o = LuaBindSceneObj.Get(arg0, arg1); ToLua.Push(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaBindSceneObj.Get")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static LuaTable Get(GameObject go) { LuaBindSceneObj cmp = go.GetComponent <LuaBindSceneObj>(); if (cmp == null) { return(null); } return(cmp.table); }
//public Animator animator; public static void Add(GameObject go, LuaTable tableClass) { LuaBindSceneObj cmp = go.GetComponent <LuaBindSceneObj>(); if (cmp == null) { cmp = go.AddComponent <LuaBindSceneObj>(); } cmp.table = tableClass; cmp.target = go.transform; }
static int OnActionTrigger(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); LuaBindSceneObj obj = (LuaBindSceneObj)ToLua.CheckObject(L, 1, typeof(LuaBindSceneObj)); string arg0 = ToLua.CheckString(L, 2); obj.OnActionTrigger(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int Add(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); LuaBindSceneObj.Add(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int set_target(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); LuaBindSceneObj obj = (LuaBindSceneObj)o; UnityEngine.Transform arg0 = (UnityEngine.Transform)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.Transform)); obj.target = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index target on a nil value" : e.Message)); } }
static int set_table(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); LuaBindSceneObj obj = (LuaBindSceneObj)o; LuaTable arg0 = ToLua.CheckLuaTable(L, 2); obj.table = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index table on a nil value" : e.Message)); } }
static int get_target(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); LuaBindSceneObj obj = (LuaBindSceneObj)o; UnityEngine.Transform ret = obj.target; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index target on a nil value" : e.Message)); } }
static int get_table(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); LuaBindSceneObj obj = (LuaBindSceneObj)o; LuaInterface.LuaTable ret = obj.table; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index table on a nil value" : e.Message)); } }