static bool TrackedReference_op_Inequality__TrackedReference__TrackedReference(JSVCall vc, int argc) { UnityEngine.TrackedReference arg0 = (UnityEngine.TrackedReference)JSMgr.datax.getObject((int)JSApi.GetType.Arg); UnityEngine.TrackedReference arg1 = (UnityEngine.TrackedReference)JSMgr.datax.getObject((int)JSApi.GetType.Arg); JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(arg0 != arg1)); return(true); }
public static UnityEngine.TrackedReference GetTrackedObject(IntPtr L, int stackPos, Type type) { if (LuaDLL.lua_isnil(L, stackPos)) { return(null); } object obj = GetLuaObject(L, stackPos); if (obj == null) { LuaDLL.luaL_argerror(L, stackPos, HobaText.Format("{0} expected, got nil", type.Name)); return(null); } UnityEngine.TrackedReference uObj = obj as UnityEngine.TrackedReference; if (uObj == null) { LuaDLL.luaL_argerror(L, stackPos, HobaText.Format("{0} expected, got nil", type.Name)); return(null); } Type objType = obj.GetType(); if (type == objType || objType.IsSubclassOf(type)) { return(uObj); } LuaDLL.luaL_argerror(L, stackPos, HobaText.Format("{0} expected, got {1}", type.Name, objType.Name)); return(null); }
public static void Push(IntPtr L, UnityEngine.TrackedReference obj) { if (obj == null) { LuaDLL.lua_pushnil(L); } else { PushUserObject(L, obj); } }
public static object GetTrackedObjectSelf(IntPtr L, int stackPos, string type) { object obj = GetTranslator(L).getRawNetObject(L, stackPos); UnityEngine.TrackedReference uObj = (UnityEngine.TrackedReference)obj; if (uObj == null) { LuaDLL.luaL_argerror(L, stackPos, HobaText.Format("{0} expected, got nil", type)); return(null); } return(obj); }
static int QPYX_GetHashCode_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 1); UnityEngine.TrackedReference QPYX_obj_YXQP = (UnityEngine.TrackedReference)ToLua.CheckObject <UnityEngine.TrackedReference>(L_YXQP, 1); int QPYX_o_YXQP = QPYX_obj_YXQP.GetHashCode(); LuaDLL.lua_pushinteger(L_YXQP, QPYX_o_YXQP); return(1); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static int GetHashCode(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.TrackedReference obj = (UnityEngine.TrackedReference)ToLua.CheckObject(L, 1, typeof(UnityEngine.TrackedReference)); int o = obj.GetHashCode(); LuaDLL.lua_pushinteger(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int QPYX_op_Equality_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 2); UnityEngine.TrackedReference QPYX_arg0_YXQP = (UnityEngine.TrackedReference)ToLua.ToObject(L_YXQP, 1); UnityEngine.TrackedReference QPYX_arg1_YXQP = (UnityEngine.TrackedReference)ToLua.ToObject(L_YXQP, 2); bool QPYX_o_YXQP = QPYX_arg0_YXQP == QPYX_arg1_YXQP; LuaDLL.lua_pushboolean(L_YXQP, QPYX_o_YXQP); return(1); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static int op_Equality(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.TrackedReference arg0 = (UnityEngine.TrackedReference)ToLua.ToObject(L, 1); UnityEngine.TrackedReference arg1 = (UnityEngine.TrackedReference)ToLua.ToObject(L, 2); bool o = arg0 == arg1; LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int QPYX_Equals_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 2); UnityEngine.TrackedReference QPYX_obj_YXQP = (UnityEngine.TrackedReference)ToLua.CheckObject <UnityEngine.TrackedReference>(L_YXQP, 1); object QPYX_arg0_YXQP = ToLua.ToVarObject(L_YXQP, 2); bool QPYX_o_YXQP = QPYX_obj_YXQP != null?QPYX_obj_YXQP.Equals(QPYX_arg0_YXQP) : QPYX_arg0_YXQP == null; LuaDLL.lua_pushboolean(L_YXQP, QPYX_o_YXQP); return(1); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static int Equals(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.TrackedReference obj = (UnityEngine.TrackedReference)ToLua.CheckObject(L, 1, typeof(UnityEngine.TrackedReference)); object arg0 = ToLua.ToVarObject(L, 2); bool o = obj != null?obj.Equals(arg0) : arg0 == null; LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetHashCode(IntPtr L) { #if UNITY_EDITOR ToluaProfiler.AddCallRecord("UnityEngine.TrackedReference.GetHashCode"); #endif try { ToLua.CheckArgsCount(L, 1); UnityEngine.TrackedReference obj = (UnityEngine.TrackedReference)ToLua.CheckObject <UnityEngine.TrackedReference>(L, 1); int o = obj.GetHashCode(); LuaDLL.lua_pushinteger(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int op_Equality(IntPtr L) { #if UNITY_EDITOR ToluaProfiler.AddCallRecord("UnityEngine.TrackedReference.op_Equality"); #endif try { ToLua.CheckArgsCount(L, 2); UnityEngine.TrackedReference arg0 = (UnityEngine.TrackedReference)ToLua.ToObject(L, 1); UnityEngine.TrackedReference arg1 = (UnityEngine.TrackedReference)ToLua.ToObject(L, 2); bool o = arg0 == arg1; LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int Equals(IntPtr L) { #if UNITY_EDITOR ToluaProfiler.AddCallRecord("UnityEngine.TrackedReference.Equals"); #endif try { ToLua.CheckArgsCount(L, 2); UnityEngine.TrackedReference obj = (UnityEngine.TrackedReference)ToLua.CheckObject <UnityEngine.TrackedReference>(L, 1); object arg0 = ToLua.ToVarObject(L, 2); bool o = obj != null?obj.Equals(arg0) : arg0 == null; LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static UnityEngine.TrackedReference CheckTrackedReference(IntPtr L, int stackPos, Type type) { int udata = LuaDLL.tolua_rawnetobj(L, stackPos); object obj = null; if (udata != -1) { ObjectTranslator translator = ObjectTranslator.Get(L); obj = translator.GetObject(udata); if (obj != null) { UnityEngine.TrackedReference uObj = (UnityEngine.TrackedReference)obj; if (uObj == null) { LuaDLL.luaL_argerror(L, stackPos, string.Format("{0} expected, got nil", type.FullName)); return(null); } Type objType = uObj.GetType(); if (type == objType || objType.IsSubclassOf(type)) { return(uObj); } LuaDLL.luaL_argerror(L, stackPos, string.Format("{0} expected, got {1}", type.FullName, objType.FullName)); } return(null); } else if (LuaDLL.lua_isnil(L, stackPos)) { return(null); } LuaDLL.luaL_typerror(L, stackPos, type.FullName); return(null); }
//压入一个object变量 public static void PushVarObject(IntPtr L, object o) { if (o == null) { LuaDLL.lua_pushnil(L); return; } Type t = o.GetType(); if (t.IsValueType) { if (t == typeof(bool)) { bool b = (bool)o; LuaDLL.lua_pushboolean(L, b); } else if (t.IsEnum) { Push(L, (System.Enum)o); } else if (t.IsPrimitive) { double d = Convert.ToDouble(o); LuaDLL.lua_pushnumber(L, d); } else if (t == typeof(Vector3)) { Push(L, (Vector3)o); } else if (t == typeof(Vector2)) { Push(L, (Vector2)o); } else if (t == typeof(Vector4)) { Push(L, (Vector4)o); } else if (t == typeof(Quaternion)) { Push(L, (Quaternion)o); } else if (t == typeof(Color)) { Push(L, (Color)o); } else if (t == typeof(RaycastHit)) { Push(L, (RaycastHit)o); } else if (t == typeof(Touch)) { Push(L, (Touch)o); } else if (t == typeof(Ray)) { Push(L, (Ray)o); } else { PushValue(L, o); } } else { if (t.IsArray) { PushArray(L, (System.Array)o); } else if (t.IsSubclassOf(typeof(Delegate))) { Push(L, (Delegate)o); } else if (IsClassOf(t, typeof(IEnumerator))) { Push(L, (IEnumerator)o); } else if (t == typeof(string)) { string str = (string)o; LuaDLL.lua_pushstring(L, str); } else if (t == typeof(LuaStringBuffer)) { LuaStringBuffer lsb = (LuaStringBuffer)o; LuaDLL.lua_pushlstring(L, lsb.buffer, lsb.buffer.Length); } else if (t.IsSubclassOf(typeof(UnityEngine.Object))) { UnityEngine.Object obj = (UnityEngine.Object)o; if (obj == null) { LuaDLL.lua_pushnil(L); } else { PushObject(L, o); } } else if (t == typeof(LuaTable)) { ((LuaTable)o).push(L); } else if (t == typeof(LuaFunction)) { ((LuaFunction)o).push(L); } else if (t == typeof(LuaCSFunction)) { GetTranslator(L).pushFunction(L, (LuaCSFunction)o); } else if (t == monoType) { Push(L, (Type)o); } else if (t.IsSubclassOf(typeof(TrackedReference))) { UnityEngine.TrackedReference obj = (UnityEngine.TrackedReference)o; if (obj == null) { LuaDLL.lua_pushnil(L); } else { PushObject(L, o); } } else { PushObject(L, o); } } }
static bool TrackedReference_op_Implicit__TrackedReference_to_Boolean(JSVCall vc, int argc) { UnityEngine.TrackedReference arg0 = (UnityEngine.TrackedReference)JSMgr.datax.getObject((int)JSApi.GetType.Arg); JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)((System.Boolean)arg0)); return(true); }