Пример #1
0
        static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) >= 2 && translator.Assignable <UnityEngine.Vector2>(L, 2) && (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 3) || translator.Assignable <UnityEngine.GUILayoutOption>(L, 3)))
                {
                    UnityEngine.Vector2           scrollPosition; translator.Get(L, 2, out scrollPosition);
                    UnityEngine.GUILayoutOption[] options = translator.GetParams <UnityEngine.GUILayoutOption>(L, 3);

                    UnityEngine.GUILayout.ScrollViewScope __cl_gen_ret = new UnityEngine.GUILayout.ScrollViewScope(scrollPosition, options);
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) >= 4 && translator.Assignable <UnityEngine.Vector2>(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4) && (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 5) || translator.Assignable <UnityEngine.GUILayoutOption>(L, 5)))
                {
                    UnityEngine.Vector2 scrollPosition; translator.Get(L, 2, out scrollPosition);
                    bool alwaysShowHorizontal             = LuaAPI.lua_toboolean(L, 3);
                    bool alwaysShowVertical               = LuaAPI.lua_toboolean(L, 4);
                    UnityEngine.GUILayoutOption[] options = translator.GetParams <UnityEngine.GUILayoutOption>(L, 5);

                    UnityEngine.GUILayout.ScrollViewScope __cl_gen_ret = new UnityEngine.GUILayout.ScrollViewScope(scrollPosition, alwaysShowHorizontal, alwaysShowVertical, options);
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) >= 4 && translator.Assignable <UnityEngine.Vector2>(L, 2) && translator.Assignable <UnityEngine.GUIStyle>(L, 3) && translator.Assignable <UnityEngine.GUIStyle>(L, 4) && (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 5) || translator.Assignable <UnityEngine.GUILayoutOption>(L, 5)))
                {
                    UnityEngine.Vector2           scrollPosition; translator.Get(L, 2, out scrollPosition);
                    UnityEngine.GUIStyle          horizontalScrollbar = (UnityEngine.GUIStyle)translator.GetObject(L, 3, typeof(UnityEngine.GUIStyle));
                    UnityEngine.GUIStyle          verticalScrollbar   = (UnityEngine.GUIStyle)translator.GetObject(L, 4, typeof(UnityEngine.GUIStyle));
                    UnityEngine.GUILayoutOption[] options             = translator.GetParams <UnityEngine.GUILayoutOption>(L, 5);

                    UnityEngine.GUILayout.ScrollViewScope __cl_gen_ret = new UnityEngine.GUILayout.ScrollViewScope(scrollPosition, horizontalScrollbar, verticalScrollbar, options);
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) >= 3 && translator.Assignable <UnityEngine.Vector2>(L, 2) && translator.Assignable <UnityEngine.GUIStyle>(L, 3) && (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 4) || translator.Assignable <UnityEngine.GUILayoutOption>(L, 4)))
                {
                    UnityEngine.Vector2           scrollPosition; translator.Get(L, 2, out scrollPosition);
                    UnityEngine.GUIStyle          style   = (UnityEngine.GUIStyle)translator.GetObject(L, 3, typeof(UnityEngine.GUIStyle));
                    UnityEngine.GUILayoutOption[] options = translator.GetParams <UnityEngine.GUILayoutOption>(L, 4);

                    UnityEngine.GUILayout.ScrollViewScope __cl_gen_ret = new UnityEngine.GUILayout.ScrollViewScope(scrollPosition, style, options);
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) >= 6 && translator.Assignable <UnityEngine.Vector2>(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4) && translator.Assignable <UnityEngine.GUIStyle>(L, 5) && translator.Assignable <UnityEngine.GUIStyle>(L, 6) && (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 7) || translator.Assignable <UnityEngine.GUILayoutOption>(L, 7)))
                {
                    UnityEngine.Vector2 scrollPosition; translator.Get(L, 2, out scrollPosition);
                    bool alwaysShowHorizontal = LuaAPI.lua_toboolean(L, 3);
                    bool alwaysShowVertical   = LuaAPI.lua_toboolean(L, 4);
                    UnityEngine.GUIStyle          horizontalScrollbar = (UnityEngine.GUIStyle)translator.GetObject(L, 5, typeof(UnityEngine.GUIStyle));
                    UnityEngine.GUIStyle          verticalScrollbar   = (UnityEngine.GUIStyle)translator.GetObject(L, 6, typeof(UnityEngine.GUIStyle));
                    UnityEngine.GUILayoutOption[] options             = translator.GetParams <UnityEngine.GUILayoutOption>(L, 7);

                    UnityEngine.GUILayout.ScrollViewScope __cl_gen_ret = new UnityEngine.GUILayout.ScrollViewScope(scrollPosition, alwaysShowHorizontal, alwaysShowVertical, horizontalScrollbar, verticalScrollbar, options);
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) >= 7 && translator.Assignable <UnityEngine.Vector2>(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4) && translator.Assignable <UnityEngine.GUIStyle>(L, 5) && translator.Assignable <UnityEngine.GUIStyle>(L, 6) && translator.Assignable <UnityEngine.GUIStyle>(L, 7) && (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 8) || translator.Assignable <UnityEngine.GUILayoutOption>(L, 8)))
                {
                    UnityEngine.Vector2 scrollPosition; translator.Get(L, 2, out scrollPosition);
                    bool alwaysShowHorizontal = LuaAPI.lua_toboolean(L, 3);
                    bool alwaysShowVertical   = LuaAPI.lua_toboolean(L, 4);
                    UnityEngine.GUIStyle          horizontalScrollbar = (UnityEngine.GUIStyle)translator.GetObject(L, 5, typeof(UnityEngine.GUIStyle));
                    UnityEngine.GUIStyle          verticalScrollbar   = (UnityEngine.GUIStyle)translator.GetObject(L, 6, typeof(UnityEngine.GUIStyle));
                    UnityEngine.GUIStyle          background          = (UnityEngine.GUIStyle)translator.GetObject(L, 7, typeof(UnityEngine.GUIStyle));
                    UnityEngine.GUILayoutOption[] options             = translator.GetParams <UnityEngine.GUILayoutOption>(L, 8);

                    UnityEngine.GUILayout.ScrollViewScope __cl_gen_ret = new UnityEngine.GUILayout.ScrollViewScope(scrollPosition, alwaysShowHorizontal, alwaysShowVertical, horizontalScrollbar, verticalScrollbar, background, options);
                    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.GUILayout.ScrollViewScope constructor!"));
        }
        static int _m_Instantiate_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 1 && translator.Assignable <UnityEngine.Object>(L, 1))
                {
                    UnityEngine.Object _original = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));

                    UnityEngine.Object gen_ret = UnityEngine.Object.Instantiate(_original);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 1 && translator.Assignable <UnityEngine.Object>(L, 1))
                {
                    UnityEngine.Object _original = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));

                    UnityEngine.Object gen_ret = UnityEngine.Object.Instantiate(_original);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <UnityEngine.Object>(L, 1) && translator.Assignable <UnityEngine.Transform>(L, 2))
                {
                    UnityEngine.Object    _original = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
                    UnityEngine.Transform _parent   = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));

                    UnityEngine.Object gen_ret = UnityEngine.Object.Instantiate(_original, _parent);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <UnityEngine.Object>(L, 1) && translator.Assignable <UnityEngine.Transform>(L, 2))
                {
                    UnityEngine.Object    _original = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
                    UnityEngine.Transform _parent   = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));

                    UnityEngine.Object gen_ret = UnityEngine.Object.Instantiate(_original, _parent);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <UnityEngine.Object>(L, 1) && translator.Assignable <UnityEngine.Transform>(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
                {
                    UnityEngine.Object    _original = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
                    UnityEngine.Transform _parent   = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
                    bool _instantiateInWorldSpace   = LuaAPI.lua_toboolean(L, 3);

                    UnityEngine.Object gen_ret = UnityEngine.Object.Instantiate(_original, _parent, _instantiateInWorldSpace);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <UnityEngine.Object>(L, 1) && translator.Assignable <UnityEngine.Transform>(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
                {
                    UnityEngine.Object    _original = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
                    UnityEngine.Transform _parent   = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
                    bool _worldPositionStays        = LuaAPI.lua_toboolean(L, 3);

                    UnityEngine.Object gen_ret = UnityEngine.Object.Instantiate(_original, _parent, _worldPositionStays);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <UnityEngine.Object>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Quaternion>(L, 3))
                {
                    UnityEngine.Object     _original = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
                    UnityEngine.Vector3    _position; translator.Get(L, 2, out _position);
                    UnityEngine.Quaternion _rotation; translator.Get(L, 3, out _rotation);

                    UnityEngine.Object gen_ret = UnityEngine.Object.Instantiate(_original, _position, _rotation);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <UnityEngine.Object>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Quaternion>(L, 3))
                {
                    UnityEngine.Object     _original = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
                    UnityEngine.Vector3    _position; translator.Get(L, 2, out _position);
                    UnityEngine.Quaternion _rotation; translator.Get(L, 3, out _rotation);

                    UnityEngine.Object gen_ret = UnityEngine.Object.Instantiate(_original, _position, _rotation);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && translator.Assignable <UnityEngine.Object>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Quaternion>(L, 3) && translator.Assignable <UnityEngine.Transform>(L, 4))
                {
                    UnityEngine.Object     _original = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
                    UnityEngine.Vector3    _position; translator.Get(L, 2, out _position);
                    UnityEngine.Quaternion _rotation; translator.Get(L, 3, out _rotation);
                    UnityEngine.Transform  _parent = (UnityEngine.Transform)translator.GetObject(L, 4, typeof(UnityEngine.Transform));

                    UnityEngine.Object gen_ret = UnityEngine.Object.Instantiate(_original, _position, _rotation, _parent);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && translator.Assignable <UnityEngine.Object>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Quaternion>(L, 3) && translator.Assignable <UnityEngine.Transform>(L, 4))
                {
                    UnityEngine.Object     _original = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
                    UnityEngine.Vector3    _position; translator.Get(L, 2, out _position);
                    UnityEngine.Quaternion _rotation; translator.Get(L, 3, out _rotation);
                    UnityEngine.Transform  _parent = (UnityEngine.Transform)translator.GetObject(L, 4, typeof(UnityEngine.Transform));

                    UnityEngine.Object gen_ret = UnityEngine.Object.Instantiate(_original, _position, _rotation, _parent);
                    translator.Push(L, 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.Object.Instantiate!"));
        }
Пример #3
0
        static int _m_DrawLine_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 2 && translator.Assignable <UnityEngine.Vector3>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2))
                {
                    UnityEngine.Vector3 start; translator.Get(L, 1, out start);
                    UnityEngine.Vector3 end; translator.Get(L, 2, out end);

                    UnityEngine.Debug.DrawLine(start, end);



                    return(0);
                }
                if (__gen_param_count == 3 && translator.Assignable <UnityEngine.Vector3>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Color>(L, 3))
                {
                    UnityEngine.Vector3 start; translator.Get(L, 1, out start);
                    UnityEngine.Vector3 end; translator.Get(L, 2, out end);
                    UnityEngine.Color   color; translator.Get(L, 3, out color);

                    UnityEngine.Debug.DrawLine(start, end, color);



                    return(0);
                }
                if (__gen_param_count == 4 && translator.Assignable <UnityEngine.Vector3>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Color>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    UnityEngine.Vector3 start; translator.Get(L, 1, out start);
                    UnityEngine.Vector3 end; translator.Get(L, 2, out end);
                    UnityEngine.Color   color; translator.Get(L, 3, out color);
                    float duration = (float)LuaAPI.lua_tonumber(L, 4);

                    UnityEngine.Debug.DrawLine(start, end, color, duration);



                    return(0);
                }
                if (__gen_param_count == 5 && translator.Assignable <UnityEngine.Vector3>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Color>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 5))
                {
                    UnityEngine.Vector3 start; translator.Get(L, 1, out start);
                    UnityEngine.Vector3 end; translator.Get(L, 2, out end);
                    UnityEngine.Color   color; translator.Get(L, 3, out color);
                    float duration  = (float)LuaAPI.lua_tonumber(L, 4);
                    bool  depthTest = LuaAPI.lua_toboolean(L, 5);

                    UnityEngine.Debug.DrawLine(start, end, color, duration, depthTest);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Debug.DrawLine!"));
        }
Пример #4
0
        public int Call(RealStatePtr L)
        {
            try
            {
#if UNITY_EDITOR && !DISABLE_OBSOLETE_WARNING
                if (method.IsDefined(typeof(ObsoleteAttribute), true))
                {
                    ObsoleteAttribute info = Attribute.GetCustomAttribute(method, typeof(ObsoleteAttribute)) as ObsoleteAttribute;
                    UnityEngine.Debug.LogWarning("Obsolete Method [" + method.DeclaringType.ToString() + "." + method.Name + "]: " + info.Message);
                }
#endif
                object     target   = null;
                MethodBase toInvoke = method;

                if (luaStackPosStart > 1)
                {
                    target = translator.FastGetCSObj(L, 1);
                    if (target is Delegate)
                    {
                        Delegate delegateInvoke = (Delegate)target;
#if UNITY_WSA && !UNITY_EDITOR
                        toInvoke = delegateInvoke.GetMethodInfo();
#else
                        toInvoke = delegateInvoke.Method;
#endif
                    }
                }


                int luaTop      = LuaAPI.lua_gettop(L);
                int luaStackPos = luaStackPosStart;

                for (int i = 0; i < castArray.Length; i++)
                {
                    //UnityEngine.Debug.Log("inPos:" + inPosArray[i]);
                    if (luaStackPos > luaTop) //after check
                    {
                        if (paramsType != null && i == castArray.Length - 1)
                        {
                            args[inPosArray[i]] = Array.CreateInstance(paramsType, 0);
                        }
                        else
                        {
                            args[inPosArray[i]] = defaultValueArray[i];
                        }
                    }
                    else
                    {
                        if (paramsType != null && i == castArray.Length - 1)
                        {
                            args[inPosArray[i]] = translator.GetParams(L, luaStackPos, paramsType);
                        }
                        else
                        {
                            args[inPosArray[i]] = castArray[i](L, luaStackPos, null);
                        }
                        luaStackPos++;
                    }
                    //UnityEngine.Debug.Log("value:" + args[inPosArray[i]]);
                }

                object ret = null;


                ret = toInvoke.IsConstructor ? ((ConstructorInfo)method).Invoke(args) : method.Invoke(targetNeeded ? target : null, args);

                int nRet = 0;

                if (!isVoid)
                {
                    //UnityEngine.Debug.Log(toInvoke.ToString() + " ret:" + ret);
                    translator.PushAny(L, ret);
                    nRet++;
                }

                for (int i = 0; i < outPosArray.Length; i++)
                {
                    if (refPos[outPosArray[i]] != -1)
                    {
                        translator.Update(L, luaStackPosStart + refPos[outPosArray[i]], args[outPosArray[i]]);
                    }
                    translator.PushAny(L, args[outPosArray[i]]);
                    nRet++;
                }

                return(nRet);
            }
            finally
            {
                for (int i = 0; i < args.Length; i++)
                {
                    args[i] = null;
                }
            }
        }
Пример #5
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Experimental.Rendering.DefaultFormat>(L, 3) && translator.Assignable <UnityEngine.Experimental.Rendering.TextureCreationFlags>(L, 4))
                {
                    int _width = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.Experimental.Rendering.DefaultFormat        _format; translator.Get(L, 3, out _format);
                    UnityEngine.Experimental.Rendering.TextureCreationFlags _flags; translator.Get(L, 4, out _flags);

                    UnityEngine.Cubemap gen_ret = new UnityEngine.Cubemap(_width, _format, _flags);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Experimental.Rendering.GraphicsFormat>(L, 3) && translator.Assignable <UnityEngine.Experimental.Rendering.TextureCreationFlags>(L, 4))
                {
                    int _width = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.Experimental.Rendering.GraphicsFormat       _format; translator.Get(L, 3, out _format);
                    UnityEngine.Experimental.Rendering.TextureCreationFlags _flags; translator.Get(L, 4, out _flags);

                    UnityEngine.Cubemap gen_ret = new UnityEngine.Cubemap(_width, _format, _flags);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.TextureFormat>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    int _width = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.TextureFormat _format; translator.Get(L, 3, out _format);
                    int _mipCount = LuaAPI.xlua_tointeger(L, 4);

                    UnityEngine.Cubemap gen_ret = new UnityEngine.Cubemap(_width, _format, _mipCount);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 5 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Experimental.Rendering.GraphicsFormat>(L, 3) && translator.Assignable <UnityEngine.Experimental.Rendering.TextureCreationFlags>(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5))
                {
                    int _width = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.Experimental.Rendering.GraphicsFormat       _format; translator.Get(L, 3, out _format);
                    UnityEngine.Experimental.Rendering.TextureCreationFlags _flags; translator.Get(L, 4, out _flags);
                    int _mipCount = LuaAPI.xlua_tointeger(L, 5);

                    UnityEngine.Cubemap gen_ret = new UnityEngine.Cubemap(_width, _format, _flags, _mipCount);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.TextureFormat>(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4))
                {
                    int _width = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.TextureFormat _textureFormat; translator.Get(L, 3, out _textureFormat);
                    bool _mipChain = LuaAPI.lua_toboolean(L, 4);

                    UnityEngine.Cubemap gen_ret = new UnityEngine.Cubemap(_width, _textureFormat, _mipChain);
                    translator.Push(L, 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.Cubemap constructor!"));
        }
Пример #6
0
        static int _m_CircleXZ(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Pathfinding.Util.Draw gen_to_be_invoked = (Pathfinding.Util.Draw)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 6 && translator.Assignable <UnityEngine.Vector3>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <UnityEngine.Color>(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 6))
                {
                    UnityEngine.Vector3 _center; translator.Get(L, 2, out _center);
                    float             _radius = (float)LuaAPI.lua_tonumber(L, 3);
                    UnityEngine.Color _color; translator.Get(L, 4, out _color);
                    float             _startAngle = (float)LuaAPI.lua_tonumber(L, 5);
                    float             _endAngle   = (float)LuaAPI.lua_tonumber(L, 6);

                    gen_to_be_invoked.CircleXZ(
                        _center,
                        _radius,
                        _color,
                        _startAngle,
                        _endAngle);



                    return(0);
                }
                if (gen_param_count == 5 && translator.Assignable <UnityEngine.Vector3>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <UnityEngine.Color>(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5))
                {
                    UnityEngine.Vector3 _center; translator.Get(L, 2, out _center);
                    float             _radius = (float)LuaAPI.lua_tonumber(L, 3);
                    UnityEngine.Color _color; translator.Get(L, 4, out _color);
                    float             _startAngle = (float)LuaAPI.lua_tonumber(L, 5);

                    gen_to_be_invoked.CircleXZ(
                        _center,
                        _radius,
                        _color,
                        _startAngle);



                    return(0);
                }
                if (gen_param_count == 4 && translator.Assignable <UnityEngine.Vector3>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <UnityEngine.Color>(L, 4))
                {
                    UnityEngine.Vector3 _center; translator.Get(L, 2, out _center);
                    float             _radius = (float)LuaAPI.lua_tonumber(L, 3);
                    UnityEngine.Color _color; translator.Get(L, 4, out _color);

                    gen_to_be_invoked.CircleXZ(
                        _center,
                        _radius,
                        _color);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to Pathfinding.Util.Draw.CircleXZ!"));
        }
        static int _m_GetPixels(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.Texture2D __cl_gen_to_be_invoked = (UnityEngine.Texture2D)translator.FastGetCSObj(L, 1);


                int __gen_param_count = LuaAPI.lua_gettop(L);

                if (__gen_param_count == 1)
                {
                    UnityEngine.Color[] __cl_gen_ret = __cl_gen_to_be_invoked.GetPixels(  );
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    int miplevel = LuaAPI.xlua_tointeger(L, 2);

                    UnityEngine.Color[] __cl_gen_ret = __cl_gen_to_be_invoked.GetPixels(miplevel);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 5 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5))
                {
                    int x           = LuaAPI.xlua_tointeger(L, 2);
                    int y           = LuaAPI.xlua_tointeger(L, 3);
                    int blockWidth  = LuaAPI.xlua_tointeger(L, 4);
                    int blockHeight = LuaAPI.xlua_tointeger(L, 5);

                    UnityEngine.Color[] __cl_gen_ret = __cl_gen_to_be_invoked.GetPixels(x, y, blockWidth, blockHeight);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 6 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 6))
                {
                    int x           = LuaAPI.xlua_tointeger(L, 2);
                    int y           = LuaAPI.xlua_tointeger(L, 3);
                    int blockWidth  = LuaAPI.xlua_tointeger(L, 4);
                    int blockHeight = LuaAPI.xlua_tointeger(L, 5);
                    int miplevel    = LuaAPI.xlua_tointeger(L, 6);

                    UnityEngine.Color[] __cl_gen_ret = __cl_gen_to_be_invoked.GetPixels(x, y, blockWidth, blockHeight, miplevel);
                    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.Texture2D.GetPixels!"));
        }
Пример #8
0
        static int _m_To_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    float _startValue = (float)LuaAPI.lua_tonumber(L, 1);
                    float _endValue   = (float)LuaAPI.lua_tonumber(L, 2);
                    float _duration   = (float)LuaAPI.lua_tonumber(L, 3);

                    FairyGUI.GTweener gen_ret = FairyGUI.GTween.To(_startValue, _endValue, _duration);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <UnityEngine.Vector2>(L, 1) && translator.Assignable <UnityEngine.Vector2>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    UnityEngine.Vector2 _startValue; translator.Get(L, 1, out _startValue);
                    UnityEngine.Vector2 _endValue; translator.Get(L, 2, out _endValue);
                    float _duration = (float)LuaAPI.lua_tonumber(L, 3);

                    FairyGUI.GTweener gen_ret = FairyGUI.GTween.To(_startValue, _endValue, _duration);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <UnityEngine.Vector3>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    UnityEngine.Vector3 _startValue; translator.Get(L, 1, out _startValue);
                    UnityEngine.Vector3 _endValue; translator.Get(L, 2, out _endValue);
                    float _duration = (float)LuaAPI.lua_tonumber(L, 3);

                    FairyGUI.GTweener gen_ret = FairyGUI.GTween.To(_startValue, _endValue, _duration);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <UnityEngine.Vector4>(L, 1) && translator.Assignable <UnityEngine.Vector4>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    UnityEngine.Vector4 _startValue; translator.Get(L, 1, out _startValue);
                    UnityEngine.Vector4 _endValue; translator.Get(L, 2, out _endValue);
                    float _duration = (float)LuaAPI.lua_tonumber(L, 3);

                    FairyGUI.GTweener gen_ret = FairyGUI.GTween.To(_startValue, _endValue, _duration);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <UnityEngine.Color>(L, 1) && translator.Assignable <UnityEngine.Color>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    UnityEngine.Color _startValue; translator.Get(L, 1, out _startValue);
                    UnityEngine.Color _endValue; translator.Get(L, 2, out _endValue);
                    float             _duration = (float)LuaAPI.lua_tonumber(L, 3);

                    FairyGUI.GTweener gen_ret = FairyGUI.GTween.To(_startValue, _endValue, _duration);
                    translator.Push(L, 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 FairyGUI.GTween.To!"));
        }
Пример #9
0
        static int _m_BroadcastMessage(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.Component gen_to_be_invoked = (UnityEngine.Component)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    string _methodName = LuaAPI.lua_tostring(L, 2);

                    gen_to_be_invoked.BroadcastMessage(
                        _methodName);



                    return(0);
                }
                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <object>(L, 3))
                {
                    string _methodName = LuaAPI.lua_tostring(L, 2);
                    object _parameter  = translator.GetObject(L, 3, typeof(object));

                    gen_to_be_invoked.BroadcastMessage(
                        _methodName,
                        _parameter);



                    return(0);
                }
                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <UnityEngine.SendMessageOptions>(L, 3))
                {
                    string _methodName = LuaAPI.lua_tostring(L, 2);
                    UnityEngine.SendMessageOptions _options; translator.Get(L, 3, out _options);

                    gen_to_be_invoked.BroadcastMessage(
                        _methodName,
                        _options);



                    return(0);
                }
                if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <object>(L, 3) && translator.Assignable <UnityEngine.SendMessageOptions>(L, 4))
                {
                    string _methodName = LuaAPI.lua_tostring(L, 2);
                    object _parameter  = translator.GetObject(L, 3, typeof(object));
                    UnityEngine.SendMessageOptions _options; translator.Get(L, 4, out _options);

                    gen_to_be_invoked.BroadcastMessage(
                        _methodName,
                        _parameter,
                        _options);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Component.BroadcastMessage!"));
        }
Пример #10
0
        static int _m_EasedValue_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <DG.Tweening.Ease>(L, 4))
                {
                    float            from = (float)LuaAPI.lua_tonumber(L, 1);
                    float            to   = (float)LuaAPI.lua_tonumber(L, 2);
                    float            lifetimePercentage = (float)LuaAPI.lua_tonumber(L, 3);
                    DG.Tweening.Ease easeType; translator.Get(L, 4, out easeType);

                    float __cl_gen_ret = DG.Tweening.DOVirtual.EasedValue(from, to, lifetimePercentage, easeType);
                    LuaAPI.lua_pushnumber(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <UnityEngine.AnimationCurve>(L, 4))
                {
                    float from = (float)LuaAPI.lua_tonumber(L, 1);
                    float to   = (float)LuaAPI.lua_tonumber(L, 2);
                    float lifetimePercentage             = (float)LuaAPI.lua_tonumber(L, 3);
                    UnityEngine.AnimationCurve easeCurve = (UnityEngine.AnimationCurve)translator.GetObject(L, 4, typeof(UnityEngine.AnimationCurve));

                    float __cl_gen_ret = DG.Tweening.DOVirtual.EasedValue(from, to, lifetimePercentage, easeCurve);
                    LuaAPI.lua_pushnumber(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 5 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <DG.Tweening.Ease>(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5))
                {
                    float            from = (float)LuaAPI.lua_tonumber(L, 1);
                    float            to   = (float)LuaAPI.lua_tonumber(L, 2);
                    float            lifetimePercentage = (float)LuaAPI.lua_tonumber(L, 3);
                    DG.Tweening.Ease easeType; translator.Get(L, 4, out easeType);
                    float            overshoot = (float)LuaAPI.lua_tonumber(L, 5);

                    float __cl_gen_ret = DG.Tweening.DOVirtual.EasedValue(from, to, lifetimePercentage, easeType, overshoot);
                    LuaAPI.lua_pushnumber(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 6 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <DG.Tweening.Ease>(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 6))
                {
                    float            from = (float)LuaAPI.lua_tonumber(L, 1);
                    float            to   = (float)LuaAPI.lua_tonumber(L, 2);
                    float            lifetimePercentage = (float)LuaAPI.lua_tonumber(L, 3);
                    DG.Tweening.Ease easeType; translator.Get(L, 4, out easeType);
                    float            amplitude = (float)LuaAPI.lua_tonumber(L, 5);
                    float            period    = (float)LuaAPI.lua_tonumber(L, 6);

                    float __cl_gen_ret = DG.Tweening.DOVirtual.EasedValue(from, to, lifetimePercentage, easeType, amplitude, period);
                    LuaAPI.lua_pushnumber(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 DG.Tweening.DOVirtual.EasedValue!"));
        }
        static int _m_CrossFadeQueued(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.Animation gen_to_be_invoked = (UnityEngine.Animation)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    string _animation = LuaAPI.lua_tostring(L, 2);

                    var gen_ret = gen_to_be_invoked.CrossFadeQueued(_animation);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    string _animation  = LuaAPI.lua_tostring(L, 2);
                    float  _fadeLength = (float)LuaAPI.lua_tonumber(L, 3);

                    var gen_ret = gen_to_be_invoked.CrossFadeQueued(_animation, _fadeLength);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <UnityEngine.QueueMode>(L, 4))
                {
                    string _animation  = LuaAPI.lua_tostring(L, 2);
                    float  _fadeLength = (float)LuaAPI.lua_tonumber(L, 3);
                    UnityEngine.QueueMode _queue; translator.Get(L, 4, out _queue);

                    var gen_ret = gen_to_be_invoked.CrossFadeQueued(_animation, _fadeLength, _queue);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 5 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <UnityEngine.QueueMode>(L, 4) && translator.Assignable <UnityEngine.PlayMode>(L, 5))
                {
                    string _animation  = LuaAPI.lua_tostring(L, 2);
                    float  _fadeLength = (float)LuaAPI.lua_tonumber(L, 3);
                    UnityEngine.QueueMode _queue; translator.Get(L, 4, out _queue);
                    UnityEngine.PlayMode  _mode; translator.Get(L, 5, out _mode);

                    var gen_ret = gen_to_be_invoked.CrossFadeQueued(_animation, _fadeLength, _queue, _mode);
                    translator.Push(L, 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.Animation.CrossFadeQueued!"));
        }
Пример #12
0
        static int _m_SetEase(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                DG.Tweening.Tweener gen_to_be_invoked = (DG.Tweening.Tweener)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <DG.Tweening.Ease>(L, 2))
                {
                    DG.Tweening.Ease _ease; translator.Get(L, 2, out _ease);

                    var gen_ret = gen_to_be_invoked.SetEase(_ease);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <UnityEngine.AnimationCurve>(L, 2))
                {
                    UnityEngine.AnimationCurve _animCurve = (UnityEngine.AnimationCurve)translator.GetObject(L, 2, typeof(UnityEngine.AnimationCurve));

                    var gen_ret = gen_to_be_invoked.SetEase(_animCurve);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <DG.Tweening.EaseFunction>(L, 2))
                {
                    DG.Tweening.EaseFunction _customEase = translator.GetDelegate <DG.Tweening.EaseFunction>(L, 2);

                    var gen_ret = gen_to_be_invoked.SetEase(_customEase);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <DG.Tweening.Ease>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    DG.Tweening.Ease _ease; translator.Get(L, 2, out _ease);
                    float            _overshoot = (float)LuaAPI.lua_tonumber(L, 3);

                    var gen_ret = gen_to_be_invoked.SetEase(_ease, _overshoot);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && translator.Assignable <DG.Tweening.Ease>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    DG.Tweening.Ease _ease; translator.Get(L, 2, out _ease);
                    float            _amplitude = (float)LuaAPI.lua_tonumber(L, 3);
                    float            _period    = (float)LuaAPI.lua_tonumber(L, 4);

                    var gen_ret = gen_to_be_invoked.SetEase(_ease, _amplitude, _period);
                    translator.Push(L, 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 DG.Tweening.Tweener.SetEase!"));
        }
Пример #13
0
        static int _m_ChangeEndValue(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                DG.Tweening.Tweener gen_to_be_invoked = (DG.Tweening.Tweener)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 3 && translator.Assignable <object>(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
                {
                    object _newEndValue    = translator.GetObject(L, 2, typeof(object));
                    bool   _snapStartValue = LuaAPI.lua_toboolean(L, 3);

                    var gen_ret = gen_to_be_invoked.ChangeEndValue(_newEndValue, _snapStartValue);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && translator.Assignable <object>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4))
                {
                    object _newEndValue    = translator.GetObject(L, 2, typeof(object));
                    float  _newDuration    = (float)LuaAPI.lua_tonumber(L, 3);
                    bool   _snapStartValue = LuaAPI.lua_toboolean(L, 4);

                    var gen_ret = gen_to_be_invoked.ChangeEndValue(_newEndValue, _newDuration, _snapStartValue);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <object>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    object _newEndValue = translator.GetObject(L, 2, typeof(object));
                    float  _newDuration = (float)LuaAPI.lua_tonumber(L, 3);

                    var gen_ret = gen_to_be_invoked.ChangeEndValue(_newEndValue, _newDuration);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <object>(L, 2))
                {
                    object _newEndValue = translator.GetObject(L, 2, typeof(object));

                    var gen_ret = gen_to_be_invoked.ChangeEndValue(_newEndValue);
                    translator.Push(L, 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 DG.Tweening.Tweener.ChangeEndValue!"));
        }
Пример #14
0
        static int _m_ContainsPointXZ_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <UnityEngine.Vector3[]>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2))
                {
                    UnityEngine.Vector3[] _polyPoints = (UnityEngine.Vector3[])translator.GetObject(L, 1, typeof(UnityEngine.Vector3[]));
                    UnityEngine.Vector3   _p; translator.Get(L, 2, out _p);

                    bool gen_ret = PF.Polygon.ContainsPointXZ(
                        _polyPoints,
                        _p);
                    LuaAPI.lua_pushboolean(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && translator.Assignable <UnityEngine.Vector3>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Vector3>(L, 3) && translator.Assignable <UnityEngine.Vector3>(L, 4))
                {
                    UnityEngine.Vector3 _a; translator.Get(L, 1, out _a);
                    UnityEngine.Vector3 _b; translator.Get(L, 2, out _b);
                    UnityEngine.Vector3 _c; translator.Get(L, 3, out _c);
                    UnityEngine.Vector3 _p; translator.Get(L, 4, out _p);

                    bool gen_ret = PF.Polygon.ContainsPointXZ(
                        _a,
                        _b,
                        _c,
                        _p);
                    LuaAPI.lua_pushboolean(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && translator.Assignable <PF.Int3>(L, 1) && translator.Assignable <PF.Int3>(L, 2) && translator.Assignable <PF.Int3>(L, 3) && translator.Assignable <PF.Int3>(L, 4))
                {
                    PF.Int3 _a; translator.Get(L, 1, out _a);
                    PF.Int3 _b; translator.Get(L, 2, out _b);
                    PF.Int3 _c; translator.Get(L, 3, out _c);
                    PF.Int3 _p; translator.Get(L, 4, out _p);

                    bool gen_ret = PF.Polygon.ContainsPointXZ(
                        _a,
                        _b,
                        _c,
                        _p);
                    LuaAPI.lua_pushboolean(L, 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 PF.Polygon.ContainsPointXZ!"));
        }
Пример #15
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    LitJson.JsonData gen_ret = new LitJson.JsonData();
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2))
                {
                    bool _boolean = LuaAPI.lua_toboolean(L, 2);

                    LitJson.JsonData gen_ret = new LitJson.JsonData(_boolean);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    double _number = LuaAPI.lua_tonumber(L, 2);

                    LitJson.JsonData gen_ret = new LitJson.JsonData(_number);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    int _number = LuaAPI.xlua_tointeger(L, 2);

                    LitJson.JsonData gen_ret = new LitJson.JsonData(_number);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isint64(L, 2)))
                {
                    long _number = LuaAPI.lua_toint64(L, 2);

                    LitJson.JsonData gen_ret = new LitJson.JsonData(_number);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <object>(L, 2))
                {
                    object _obj = translator.GetObject(L, 2, typeof(object));

                    LitJson.JsonData gen_ret = new LitJson.JsonData(_obj);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    string _str = LuaAPI.lua_tostring(L, 2);

                    LitJson.JsonData gen_ret = new LitJson.JsonData(_str);
                    translator.Push(L, 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 LitJson.JsonData constructor!"));
        }
Пример #16
0
        static int _m_StartPath(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Pathfinding.Seeker gen_to_be_invoked = (Pathfinding.Seeker)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 3 && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Vector3>(L, 3))
                {
                    UnityEngine.Vector3 _start; translator.Get(L, 2, out _start);
                    UnityEngine.Vector3 _end; translator.Get(L, 3, out _end);

                    PF.Path gen_ret = gen_to_be_invoked.StartPath(_start, _end);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <PF.Path>(L, 2) && translator.Assignable <PF.OnPathDelegate>(L, 3))
                {
                    PF.Path           _p        = (PF.Path)translator.GetObject(L, 2, typeof(PF.Path));
                    PF.OnPathDelegate _callback = translator.GetDelegate <PF.OnPathDelegate>(L, 3);

                    PF.Path gen_ret = gen_to_be_invoked.StartPath(_p, _callback);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <PF.Path>(L, 2))
                {
                    PF.Path _p = (PF.Path)translator.GetObject(L, 2, typeof(PF.Path));

                    PF.Path gen_ret = gen_to_be_invoked.StartPath(_p);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && translator.Assignable <PF.Path>(L, 2) && translator.Assignable <PF.OnPathDelegate>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    PF.Path           _p        = (PF.Path)translator.GetObject(L, 2, typeof(PF.Path));
                    PF.OnPathDelegate _callback = translator.GetDelegate <PF.OnPathDelegate>(L, 3);
                    int _graphMask = LuaAPI.xlua_tointeger(L, 4);

                    PF.Path gen_ret = gen_to_be_invoked.StartPath(_p, _callback, _graphMask);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Vector3>(L, 3) && translator.Assignable <PF.OnPathDelegate>(L, 4))
                {
                    UnityEngine.Vector3 _start; translator.Get(L, 2, out _start);
                    UnityEngine.Vector3 _end; translator.Get(L, 3, out _end);
                    PF.OnPathDelegate   _callback = translator.GetDelegate <PF.OnPathDelegate>(L, 4);

                    PF.Path gen_ret = gen_to_be_invoked.StartPath(_start, _end, _callback);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 5 && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Vector3>(L, 3) && translator.Assignable <PF.OnPathDelegate>(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5))
                {
                    UnityEngine.Vector3 _start; translator.Get(L, 2, out _start);
                    UnityEngine.Vector3 _end; translator.Get(L, 3, out _end);
                    PF.OnPathDelegate   _callback = translator.GetDelegate <PF.OnPathDelegate>(L, 4);
                    int _graphMask = LuaAPI.xlua_tointeger(L, 5);

                    PF.Path gen_ret = gen_to_be_invoked.StartPath(_start, _end, _callback, _graphMask);
                    translator.Push(L, 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 Pathfinding.Seeker.StartPath!"));
        }
Пример #17
0
        static int _m_UpdateGraphsNoBlock_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 3 && translator.Assignable <Pathfinding.GraphUpdateObject>(L, 1) && translator.Assignable <System.Collections.Generic.List <PF.GraphNode> >(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
                {
                    Pathfinding.GraphUpdateObject _guo = (Pathfinding.GraphUpdateObject)translator.GetObject(L, 1, typeof(Pathfinding.GraphUpdateObject));
                    System.Collections.Generic.List <PF.GraphNode> _nodes = (System.Collections.Generic.List <PF.GraphNode>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List <PF.GraphNode>));
                    bool _alwaysRevert = LuaAPI.lua_toboolean(L, 3);

                    bool gen_ret = Pathfinding.GraphUpdateUtilities.UpdateGraphsNoBlock(
                        _guo,
                        _nodes,
                        _alwaysRevert);
                    LuaAPI.lua_pushboolean(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <Pathfinding.GraphUpdateObject>(L, 1) && translator.Assignable <System.Collections.Generic.List <PF.GraphNode> >(L, 2))
                {
                    Pathfinding.GraphUpdateObject _guo = (Pathfinding.GraphUpdateObject)translator.GetObject(L, 1, typeof(Pathfinding.GraphUpdateObject));
                    System.Collections.Generic.List <PF.GraphNode> _nodes = (System.Collections.Generic.List <PF.GraphNode>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List <PF.GraphNode>));

                    bool gen_ret = Pathfinding.GraphUpdateUtilities.UpdateGraphsNoBlock(
                        _guo,
                        _nodes);
                    LuaAPI.lua_pushboolean(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && translator.Assignable <Pathfinding.GraphUpdateObject>(L, 1) && translator.Assignable <PF.GraphNode>(L, 2) && translator.Assignable <PF.GraphNode>(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4))
                {
                    Pathfinding.GraphUpdateObject _guo = (Pathfinding.GraphUpdateObject)translator.GetObject(L, 1, typeof(Pathfinding.GraphUpdateObject));
                    PF.GraphNode _node1        = (PF.GraphNode)translator.GetObject(L, 2, typeof(PF.GraphNode));
                    PF.GraphNode _node2        = (PF.GraphNode)translator.GetObject(L, 3, typeof(PF.GraphNode));
                    bool         _alwaysRevert = LuaAPI.lua_toboolean(L, 4);

                    bool gen_ret = Pathfinding.GraphUpdateUtilities.UpdateGraphsNoBlock(
                        _guo,
                        _node1,
                        _node2,
                        _alwaysRevert);
                    LuaAPI.lua_pushboolean(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <Pathfinding.GraphUpdateObject>(L, 1) && translator.Assignable <PF.GraphNode>(L, 2) && translator.Assignable <PF.GraphNode>(L, 3))
                {
                    Pathfinding.GraphUpdateObject _guo = (Pathfinding.GraphUpdateObject)translator.GetObject(L, 1, typeof(Pathfinding.GraphUpdateObject));
                    PF.GraphNode _node1 = (PF.GraphNode)translator.GetObject(L, 2, typeof(PF.GraphNode));
                    PF.GraphNode _node2 = (PF.GraphNode)translator.GetObject(L, 3, typeof(PF.GraphNode));

                    bool gen_ret = Pathfinding.GraphUpdateUtilities.UpdateGraphsNoBlock(
                        _guo,
                        _node1,
                        _node2);
                    LuaAPI.lua_pushboolean(L, 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 Pathfinding.GraphUpdateUtilities.UpdateGraphsNoBlock!"));
        }
        static int _m_StopMotion_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && translator.Assignable <System.Nullable <DG.Tweening.Ease> >(L, 2))
                {
                    int motionFps = LuaAPI.xlua_tointeger(L, 1);
                    System.Nullable <DG.Tweening.Ease> ease; translator.Get(L, 2, out ease);

                    DG.Tweening.EaseFunction __cl_gen_ret = DG.Tweening.EaseFactory.StopMotion(motionFps, ease);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1))
                {
                    int motionFps = LuaAPI.xlua_tointeger(L, 1);

                    DG.Tweening.EaseFunction __cl_gen_ret = DG.Tweening.EaseFactory.StopMotion(motionFps);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && translator.Assignable <UnityEngine.AnimationCurve>(L, 2))
                {
                    int motionFps = LuaAPI.xlua_tointeger(L, 1);
                    UnityEngine.AnimationCurve animCurve = (UnityEngine.AnimationCurve)translator.GetObject(L, 2, typeof(UnityEngine.AnimationCurve));

                    DG.Tweening.EaseFunction __cl_gen_ret = DG.Tweening.EaseFactory.StopMotion(motionFps, animCurve);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && translator.Assignable <DG.Tweening.EaseFunction>(L, 2))
                {
                    int motionFps = LuaAPI.xlua_tointeger(L, 1);
                    DG.Tweening.EaseFunction customEase = translator.GetDelegate <DG.Tweening.EaseFunction>(L, 2);

                    DG.Tweening.EaseFunction __cl_gen_ret = DG.Tweening.EaseFactory.StopMotion(motionFps, customEase);
                    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 DG.Tweening.EaseFactory.StopMotion!"));
        }
        static int _m_SetPixels32(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.Texture2D __cl_gen_to_be_invoked = (UnityEngine.Texture2D)translator.FastGetCSObj(L, 1);


                int __gen_param_count = LuaAPI.lua_gettop(L);

                if (__gen_param_count == 2 && translator.Assignable <UnityEngine.Color32[]>(L, 2))
                {
                    UnityEngine.Color32[] colors = (UnityEngine.Color32[])translator.GetObject(L, 2, typeof(UnityEngine.Color32[]));

                    __cl_gen_to_be_invoked.SetPixels32(colors);



                    return(0);
                }
                if (__gen_param_count == 3 && translator.Assignable <UnityEngine.Color32[]>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    UnityEngine.Color32[] colors = (UnityEngine.Color32[])translator.GetObject(L, 2, typeof(UnityEngine.Color32[]));
                    int miplevel = LuaAPI.xlua_tointeger(L, 3);

                    __cl_gen_to_be_invoked.SetPixels32(colors, miplevel);



                    return(0);
                }
                if (__gen_param_count == 6 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && translator.Assignable <UnityEngine.Color32[]>(L, 6))
                {
                    int x           = LuaAPI.xlua_tointeger(L, 2);
                    int y           = LuaAPI.xlua_tointeger(L, 3);
                    int blockWidth  = LuaAPI.xlua_tointeger(L, 4);
                    int blockHeight = LuaAPI.xlua_tointeger(L, 5);
                    UnityEngine.Color32[] colors = (UnityEngine.Color32[])translator.GetObject(L, 6, typeof(UnityEngine.Color32[]));

                    __cl_gen_to_be_invoked.SetPixels32(x, y, blockWidth, blockHeight, colors);



                    return(0);
                }
                if (__gen_param_count == 7 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && translator.Assignable <UnityEngine.Color32[]>(L, 6) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 7))
                {
                    int x           = LuaAPI.xlua_tointeger(L, 2);
                    int y           = LuaAPI.xlua_tointeger(L, 3);
                    int blockWidth  = LuaAPI.xlua_tointeger(L, 4);
                    int blockHeight = LuaAPI.xlua_tointeger(L, 5);
                    UnityEngine.Color32[] colors = (UnityEngine.Color32[])translator.GetObject(L, 6, typeof(UnityEngine.Color32[]));
                    int miplevel = LuaAPI.xlua_tointeger(L, 7);

                    __cl_gen_to_be_invoked.SetPixels32(x, y, blockWidth, blockHeight, colors, miplevel);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Texture2D.SetPixels32!"));
        }
Пример #20
0
        static int _m_SetCustomInput(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                FairyGUI.Stage gen_to_be_invoked = (FairyGUI.Stage)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 3 && translator.Assignable <UnityEngine.Vector2>(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
                {
                    UnityEngine.Vector2 _screenPos; translator.Get(L, 2, out _screenPos);
                    bool _buttonDown = LuaAPI.lua_toboolean(L, 3);

                    gen_to_be_invoked.SetCustomInput(_screenPos, _buttonDown);



                    return(0);
                }
                if (gen_param_count == 3 && translator.Assignable <UnityEngine.RaycastHit>(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
                {
                    UnityEngine.RaycastHit _hit; translator.Get(L, 2, out _hit);
                    bool _buttonDown = LuaAPI.lua_toboolean(L, 3);

                    gen_to_be_invoked.SetCustomInput(ref _hit, _buttonDown);
                    translator.Push(L, _hit);
                    translator.Update(L, 2, _hit);



                    return(1);
                }
                if (gen_param_count == 4 && translator.Assignable <UnityEngine.Vector2>(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4))
                {
                    UnityEngine.Vector2 _screenPos; translator.Get(L, 2, out _screenPos);
                    bool _buttonDown = LuaAPI.lua_toboolean(L, 3);
                    bool _buttonUp   = LuaAPI.lua_toboolean(L, 4);

                    gen_to_be_invoked.SetCustomInput(_screenPos, _buttonDown, _buttonUp);



                    return(0);
                }
                if (gen_param_count == 4 && translator.Assignable <UnityEngine.RaycastHit>(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4))
                {
                    UnityEngine.RaycastHit _hit; translator.Get(L, 2, out _hit);
                    bool _buttonDown = LuaAPI.lua_toboolean(L, 3);
                    bool _buttonUp   = LuaAPI.lua_toboolean(L, 4);

                    gen_to_be_invoked.SetCustomInput(ref _hit, _buttonDown, _buttonUp);
                    translator.Push(L, _hit);
                    translator.Update(L, 2, _hit);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to FairyGUI.Stage.SetCustomInput!"));
        }
        public static int XLuaAccess(RealStatePtr L)
        {
            try
            {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Type             type       = getType(L, translator, 1);
                object           obj        = null;
                if (type == null && LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TUSERDATA)
                {
                    obj = translator.SafeGetCSObj(L, 1);
                    if (obj == null)
                    {
                        return(LuaAPI.luaL_error(L, "xlua.access, #1 parameter must a type/c# object/string"));
                    }
                    type = obj.GetType();
                }

                if (type == null)
                {
                    return(LuaAPI.luaL_error(L, "xlua.access, can not find c# type"));
                }

                string fieldName = LuaAPI.lua_tostring(L, 2);

                BindingFlags bindingFlags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static;

                if (LuaAPI.lua_gettop(L) > 2) // set
                {
                    var field = type.GetField(fieldName, bindingFlags);
                    if (field != null)
                    {
                        field.SetValue(obj, translator.GetObject(L, 3, field.FieldType));
                        return(0);
                    }
                    var prop = type.GetProperty(fieldName, bindingFlags);
                    if (prop != null)
                    {
                        prop.SetValue(obj, translator.GetObject(L, 3, prop.PropertyType), null);
                        return(0);
                    }
                }
                else
                {
                    var field = type.GetField(fieldName, bindingFlags);
                    if (field != null)
                    {
                        translator.PushAny(L, field.GetValue(obj));
                        return(1);
                    }
                    var prop = type.GetProperty(fieldName, bindingFlags);
                    if (prop != null)
                    {
                        translator.PushAny(L, prop.GetValue(obj, null));
                        return(1);
                    }
                }
                return(LuaAPI.luaL_error(L, "xlua.access, no field " + fieldName));
            }
            catch (Exception e)
            {
                return(LuaAPI.luaL_error(L, "c# exception in xlua.access: " + e));
            }
        }
        static int _m_Create_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                int __gen_param_count = LuaAPI.lua_gettop(L);

                if (__gen_param_count == 3 && translator.Assignable <UnityEngine.Texture2D>(L, 1) && translator.Assignable <UnityEngine.Rect>(L, 2) && translator.Assignable <UnityEngine.Vector2>(L, 3))
                {
                    UnityEngine.Texture2D texture = (UnityEngine.Texture2D)translator.GetObject(L, 1, typeof(UnityEngine.Texture2D));
                    UnityEngine.Rect      rect; translator.Get(L, 2, out rect);
                    UnityEngine.Vector2   pivot; translator.Get(L, 3, out pivot);

                    UnityEngine.Sprite __cl_gen_ret = UnityEngine.Sprite.Create(texture, rect, pivot);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 4 && translator.Assignable <UnityEngine.Texture2D>(L, 1) && translator.Assignable <UnityEngine.Rect>(L, 2) && translator.Assignable <UnityEngine.Vector2>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    UnityEngine.Texture2D texture = (UnityEngine.Texture2D)translator.GetObject(L, 1, typeof(UnityEngine.Texture2D));
                    UnityEngine.Rect      rect; translator.Get(L, 2, out rect);
                    UnityEngine.Vector2   pivot; translator.Get(L, 3, out pivot);
                    float pixelsPerUnit = (float)LuaAPI.lua_tonumber(L, 4);

                    UnityEngine.Sprite __cl_gen_ret = UnityEngine.Sprite.Create(texture, rect, pivot, pixelsPerUnit);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 5 && translator.Assignable <UnityEngine.Texture2D>(L, 1) && translator.Assignable <UnityEngine.Rect>(L, 2) && translator.Assignable <UnityEngine.Vector2>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5))
                {
                    UnityEngine.Texture2D texture = (UnityEngine.Texture2D)translator.GetObject(L, 1, typeof(UnityEngine.Texture2D));
                    UnityEngine.Rect      rect; translator.Get(L, 2, out rect);
                    UnityEngine.Vector2   pivot; translator.Get(L, 3, out pivot);
                    float pixelsPerUnit = (float)LuaAPI.lua_tonumber(L, 4);
                    uint  extrude       = LuaAPI.xlua_touint(L, 5);

                    UnityEngine.Sprite __cl_gen_ret = UnityEngine.Sprite.Create(texture, rect, pivot, pixelsPerUnit, extrude);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 6 && translator.Assignable <UnityEngine.Texture2D>(L, 1) && translator.Assignable <UnityEngine.Rect>(L, 2) && translator.Assignable <UnityEngine.Vector2>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && translator.Assignable <UnityEngine.SpriteMeshType>(L, 6))
                {
                    UnityEngine.Texture2D texture = (UnityEngine.Texture2D)translator.GetObject(L, 1, typeof(UnityEngine.Texture2D));
                    UnityEngine.Rect      rect; translator.Get(L, 2, out rect);
                    UnityEngine.Vector2   pivot; translator.Get(L, 3, out pivot);
                    float pixelsPerUnit = (float)LuaAPI.lua_tonumber(L, 4);
                    uint  extrude       = LuaAPI.xlua_touint(L, 5);
                    UnityEngine.SpriteMeshType meshType; translator.Get(L, 6, out meshType);

                    UnityEngine.Sprite __cl_gen_ret = UnityEngine.Sprite.Create(texture, rect, pivot, pixelsPerUnit, extrude, meshType);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 7 && translator.Assignable <UnityEngine.Texture2D>(L, 1) && translator.Assignable <UnityEngine.Rect>(L, 2) && translator.Assignable <UnityEngine.Vector2>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && translator.Assignable <UnityEngine.SpriteMeshType>(L, 6) && translator.Assignable <UnityEngine.Vector4>(L, 7))
                {
                    UnityEngine.Texture2D texture = (UnityEngine.Texture2D)translator.GetObject(L, 1, typeof(UnityEngine.Texture2D));
                    UnityEngine.Rect      rect; translator.Get(L, 2, out rect);
                    UnityEngine.Vector2   pivot; translator.Get(L, 3, out pivot);
                    float pixelsPerUnit = (float)LuaAPI.lua_tonumber(L, 4);
                    uint  extrude       = LuaAPI.xlua_touint(L, 5);
                    UnityEngine.SpriteMeshType meshType; translator.Get(L, 6, out meshType);
                    UnityEngine.Vector4        border; translator.Get(L, 7, out border);

                    UnityEngine.Sprite __cl_gen_ret = UnityEngine.Sprite.Create(texture, rect, pivot, pixelsPerUnit, extrude, meshType, border);
                    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.Sprite.Create!"));
        }
Пример #23
0
        public LuaCSFunction GetConstructorWrap(Type type)
        {
            //UnityEngine.Debug.LogWarning("GetConstructor:" + type);
            if (!constructorCache.ContainsKey(type))
            {
                var constructors = type.GetConstructors();
                if (type.IsAbstract() || constructors == null || constructors.Length == 0)
                {
                    if (type.IsValueType())
                    {
                        constructorCache[type] = (L) =>
                        {
                            translator.PushAny(L, Activator.CreateInstance(type));
                            return(1);
                        };
                    }
                    else
                    {
                        return(null);
                    }
                }
                else
                {
                    LuaCSFunction ctor = _GenMethodWrap(type, ".ctor", constructors, true).Call;

                    if (type.IsValueType())
                    {
                        bool hasZeroParamsCtor = false;
                        for (int i = 0; i < constructors.Length; i++)
                        {
                            if (constructors[i].GetParameters().Length == 0)
                            {
                                hasZeroParamsCtor = true;
                                break;
                            }
                        }
                        if (hasZeroParamsCtor)
                        {
                            constructorCache[type] = ctor;
                        }
                        else
                        {
                            constructorCache[type] = (L) =>
                            {
                                if (LuaAPI.lua_gettop(L) == 1)
                                {
                                    translator.PushAny(L, Activator.CreateInstance(type));
                                    return(1);
                                }
                                else
                                {
                                    return(ctor(L));
                                }
                            };
                        }
                    }
                    else
                    {
                        constructorCache[type] = ctor;
                    }
                }
            }
            return(constructorCache[type]);
        }
Пример #24
0
        static int _m_Create_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 3 && translator.Assignable <UnityEngine.Texture2D>(L, 1) && translator.Assignable <UnityEngine.Rect>(L, 2) && translator.Assignable <UnityEngine.Vector2>(L, 3))
                {
                    UnityEngine.Texture2D _texture = (UnityEngine.Texture2D)translator.GetObject(L, 1, typeof(UnityEngine.Texture2D));
                    UnityEngine.Rect      _rect; translator.Get(L, 2, out _rect);
                    UnityEngine.Vector2   _pivot; translator.Get(L, 3, out _pivot);

                    UnityEngine.Sprite gen_ret = UnityEngine.Sprite.Create(_texture, _rect, _pivot);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && translator.Assignable <UnityEngine.Texture2D>(L, 1) && translator.Assignable <UnityEngine.Rect>(L, 2) && translator.Assignable <UnityEngine.Vector2>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    UnityEngine.Texture2D _texture = (UnityEngine.Texture2D)translator.GetObject(L, 1, typeof(UnityEngine.Texture2D));
                    UnityEngine.Rect      _rect; translator.Get(L, 2, out _rect);
                    UnityEngine.Vector2   _pivot; translator.Get(L, 3, out _pivot);
                    float _pixelsPerUnit = (float)LuaAPI.lua_tonumber(L, 4);

                    UnityEngine.Sprite gen_ret = UnityEngine.Sprite.Create(_texture, _rect, _pivot, _pixelsPerUnit);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 5 && translator.Assignable <UnityEngine.Texture2D>(L, 1) && translator.Assignable <UnityEngine.Rect>(L, 2) && translator.Assignable <UnityEngine.Vector2>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5))
                {
                    UnityEngine.Texture2D _texture = (UnityEngine.Texture2D)translator.GetObject(L, 1, typeof(UnityEngine.Texture2D));
                    UnityEngine.Rect      _rect; translator.Get(L, 2, out _rect);
                    UnityEngine.Vector2   _pivot; translator.Get(L, 3, out _pivot);
                    float _pixelsPerUnit = (float)LuaAPI.lua_tonumber(L, 4);
                    uint  _extrude       = LuaAPI.xlua_touint(L, 5);

                    UnityEngine.Sprite gen_ret = UnityEngine.Sprite.Create(_texture, _rect, _pivot, _pixelsPerUnit, _extrude);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 6 && translator.Assignable <UnityEngine.Texture2D>(L, 1) && translator.Assignable <UnityEngine.Rect>(L, 2) && translator.Assignable <UnityEngine.Vector2>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && translator.Assignable <UnityEngine.SpriteMeshType>(L, 6))
                {
                    UnityEngine.Texture2D _texture = (UnityEngine.Texture2D)translator.GetObject(L, 1, typeof(UnityEngine.Texture2D));
                    UnityEngine.Rect      _rect; translator.Get(L, 2, out _rect);
                    UnityEngine.Vector2   _pivot; translator.Get(L, 3, out _pivot);
                    float _pixelsPerUnit = (float)LuaAPI.lua_tonumber(L, 4);
                    uint  _extrude       = LuaAPI.xlua_touint(L, 5);
                    UnityEngine.SpriteMeshType _meshType; translator.Get(L, 6, out _meshType);

                    UnityEngine.Sprite gen_ret = UnityEngine.Sprite.Create(_texture, _rect, _pivot, _pixelsPerUnit, _extrude, _meshType);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 7 && translator.Assignable <UnityEngine.Texture2D>(L, 1) && translator.Assignable <UnityEngine.Rect>(L, 2) && translator.Assignable <UnityEngine.Vector2>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && translator.Assignable <UnityEngine.SpriteMeshType>(L, 6) && translator.Assignable <UnityEngine.Vector4>(L, 7))
                {
                    UnityEngine.Texture2D _texture = (UnityEngine.Texture2D)translator.GetObject(L, 1, typeof(UnityEngine.Texture2D));
                    UnityEngine.Rect      _rect; translator.Get(L, 2, out _rect);
                    UnityEngine.Vector2   _pivot; translator.Get(L, 3, out _pivot);
                    float _pixelsPerUnit = (float)LuaAPI.lua_tonumber(L, 4);
                    uint  _extrude       = LuaAPI.xlua_touint(L, 5);
                    UnityEngine.SpriteMeshType _meshType; translator.Get(L, 6, out _meshType);
                    UnityEngine.Vector4        _border; translator.Get(L, 7, out _border);

                    UnityEngine.Sprite gen_ret = UnityEngine.Sprite.Create(_texture, _rect, _pivot, _pixelsPerUnit, _extrude, _meshType, _border);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 8 && translator.Assignable <UnityEngine.Texture2D>(L, 1) && translator.Assignable <UnityEngine.Rect>(L, 2) && translator.Assignable <UnityEngine.Vector2>(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && translator.Assignable <UnityEngine.SpriteMeshType>(L, 6) && translator.Assignable <UnityEngine.Vector4>(L, 7) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 8))
                {
                    UnityEngine.Texture2D _texture = (UnityEngine.Texture2D)translator.GetObject(L, 1, typeof(UnityEngine.Texture2D));
                    UnityEngine.Rect      _rect; translator.Get(L, 2, out _rect);
                    UnityEngine.Vector2   _pivot; translator.Get(L, 3, out _pivot);
                    float _pixelsPerUnit = (float)LuaAPI.lua_tonumber(L, 4);
                    uint  _extrude       = LuaAPI.xlua_touint(L, 5);
                    UnityEngine.SpriteMeshType _meshType; translator.Get(L, 6, out _meshType);
                    UnityEngine.Vector4        _border; translator.Get(L, 7, out _border);
                    bool _generateFallbackPhysicsShape = LuaAPI.lua_toboolean(L, 8);

                    UnityEngine.Sprite gen_ret = UnityEngine.Sprite.Create(_texture, _rect, _pivot, _pixelsPerUnit, _extrude, _meshType, _border, _generateFallbackPhysicsShape);
                    translator.Push(L, 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.Sprite.Create!"));
        }
Пример #25
0
        static int _m_ClampInWalkableRange_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 2 && translator.Assignable <UnityEngine.Vector3>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    UnityEngine.Vector3 raw; translator.Get(L, 1, out raw);
                    float maxDistance = (float)LuaAPI.lua_tonumber(L, 2);

                    UnityEngine.Vector3 __cl_gen_ret = InstanceHelper.ClampInWalkableRange(raw, maxDistance);
                    translator.PushUnityEngineVector3(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 1 && translator.Assignable <UnityEngine.Vector3>(L, 1))
                {
                    UnityEngine.Vector3 raw; translator.Get(L, 1, out raw);

                    UnityEngine.Vector3 __cl_gen_ret = InstanceHelper.ClampInWalkableRange(raw);
                    translator.PushUnityEngineVector3(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 3 && translator.Assignable <UnityEngine.Vector3>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    UnityEngine.Vector3 raw; translator.Get(L, 1, out raw);
                    UnityEngine.Vector3 defaultPos; translator.Get(L, 2, out defaultPos);
                    float maxDistance = (float)LuaAPI.lua_tonumber(L, 3);

                    UnityEngine.Vector3 __cl_gen_ret = InstanceHelper.ClampInWalkableRange(raw, defaultPos, maxDistance);
                    translator.PushUnityEngineVector3(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 2 && translator.Assignable <UnityEngine.Vector3>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2))
                {
                    UnityEngine.Vector3 raw; translator.Get(L, 1, out raw);
                    UnityEngine.Vector3 defaultPos; translator.Get(L, 2, out defaultPos);

                    UnityEngine.Vector3 __cl_gen_ret = InstanceHelper.ClampInWalkableRange(raw, defaultPos);
                    translator.PushUnityEngineVector3(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 3 && translator.Assignable <UnityEngine.Vector3>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    UnityEngine.Vector3 raw; translator.Get(L, 1, out raw);
                    UnityEngine.Vector3 defaultPos; translator.Get(L, 2, out defaultPos);
                    bool  result;
                    float maxDistance = (float)LuaAPI.lua_tonumber(L, 3);

                    UnityEngine.Vector3 __cl_gen_ret = InstanceHelper.ClampInWalkableRange(raw, defaultPos, out result, maxDistance);
                    translator.PushUnityEngineVector3(L, __cl_gen_ret);
                    LuaAPI.lua_pushboolean(L, result);



                    return(2);
                }
                if (__gen_param_count == 2 && translator.Assignable <UnityEngine.Vector3>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2))
                {
                    UnityEngine.Vector3 raw; translator.Get(L, 1, out raw);
                    UnityEngine.Vector3 defaultPos; translator.Get(L, 2, out defaultPos);
                    bool result;

                    UnityEngine.Vector3 __cl_gen_ret = InstanceHelper.ClampInWalkableRange(raw, defaultPos, out result);
                    translator.PushUnityEngineVector3(L, __cl_gen_ret);
                    LuaAPI.lua_pushboolean(L, result);



                    return(2);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to InstanceHelper.ClampInWalkableRange!"));
        }
        static int _m_OpenUIForm(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityGameFramework.Runtime.UIComponent gen_to_be_invoked = (UnityGameFramework.Runtime.UIComponent)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING))
                {
                    string _uiFormAssetName = LuaAPI.lua_tostring(L, 2);
                    string _uiGroupName     = LuaAPI.lua_tostring(L, 3);

                    int gen_ret = gen_to_be_invoked.OpenUIForm(_uiFormAssetName, _uiGroupName);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    string _uiFormAssetName = LuaAPI.lua_tostring(L, 2);
                    string _uiGroupName     = LuaAPI.lua_tostring(L, 3);
                    int    _priority        = LuaAPI.xlua_tointeger(L, 4);

                    int gen_ret = gen_to_be_invoked.OpenUIForm(_uiFormAssetName, _uiGroupName, _priority);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4))
                {
                    string _uiFormAssetName    = LuaAPI.lua_tostring(L, 2);
                    string _uiGroupName        = LuaAPI.lua_tostring(L, 3);
                    bool   _pauseCoveredUIForm = LuaAPI.lua_toboolean(L, 4);

                    int gen_ret = gen_to_be_invoked.OpenUIForm(_uiFormAssetName, _uiGroupName, _pauseCoveredUIForm);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 5 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 5))
                {
                    string _uiFormAssetName    = LuaAPI.lua_tostring(L, 2);
                    string _uiGroupName        = LuaAPI.lua_tostring(L, 3);
                    int    _priority           = LuaAPI.xlua_tointeger(L, 4);
                    bool   _pauseCoveredUIForm = LuaAPI.lua_toboolean(L, 5);

                    int gen_ret = gen_to_be_invoked.OpenUIForm(_uiFormAssetName, _uiGroupName, _priority, _pauseCoveredUIForm);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && translator.Assignable <object>(L, 4))
                {
                    string _uiFormAssetName = LuaAPI.lua_tostring(L, 2);
                    string _uiGroupName     = LuaAPI.lua_tostring(L, 3);
                    object _userData        = translator.GetObject(L, 4, typeof(object));

                    int gen_ret = gen_to_be_invoked.OpenUIForm(_uiFormAssetName, _uiGroupName, _userData);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 5 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && translator.Assignable <object>(L, 5))
                {
                    string _uiFormAssetName = LuaAPI.lua_tostring(L, 2);
                    string _uiGroupName     = LuaAPI.lua_tostring(L, 3);
                    int    _priority        = LuaAPI.xlua_tointeger(L, 4);
                    object _userData        = translator.GetObject(L, 5, typeof(object));

                    int gen_ret = gen_to_be_invoked.OpenUIForm(_uiFormAssetName, _uiGroupName, _priority, _userData);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 5 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4) && translator.Assignable <object>(L, 5))
                {
                    string _uiFormAssetName    = LuaAPI.lua_tostring(L, 2);
                    string _uiGroupName        = LuaAPI.lua_tostring(L, 3);
                    bool   _pauseCoveredUIForm = LuaAPI.lua_toboolean(L, 4);
                    object _userData           = translator.GetObject(L, 5, typeof(object));

                    int gen_ret = gen_to_be_invoked.OpenUIForm(_uiFormAssetName, _uiGroupName, _pauseCoveredUIForm, _userData);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 6 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 5) && translator.Assignable <object>(L, 6))
                {
                    string _uiFormAssetName    = LuaAPI.lua_tostring(L, 2);
                    string _uiGroupName        = LuaAPI.lua_tostring(L, 3);
                    int    _priority           = LuaAPI.xlua_tointeger(L, 4);
                    bool   _pauseCoveredUIForm = LuaAPI.lua_toboolean(L, 5);
                    object _userData           = translator.GetObject(L, 6, typeof(object));

                    int gen_ret = gen_to_be_invoked.OpenUIForm(_uiFormAssetName, _uiGroupName, _priority, _pauseCoveredUIForm, _userData);
                    LuaAPI.xlua_pushinteger(L, 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 UnityGameFramework.Runtime.UIComponent.OpenUIForm!"));
        }
Пример #27
0
        static int _m_Assert_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 1 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1))
                {
                    bool condition = LuaAPI.lua_toboolean(L, 1);

                    UnityEngine.Debug.Assert(condition);



                    return(0);
                }
                if (__gen_param_count == 2 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1) && translator.Assignable <UnityEngine.Object>(L, 2))
                {
                    bool condition             = LuaAPI.lua_toboolean(L, 1);
                    UnityEngine.Object context = (UnityEngine.Object)translator.GetObject(L, 2, typeof(UnityEngine.Object));

                    UnityEngine.Debug.Assert(condition, context);



                    return(0);
                }
                if (__gen_param_count == 2 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1) && translator.Assignable <object>(L, 2))
                {
                    bool   condition = LuaAPI.lua_toboolean(L, 1);
                    object message   = translator.GetObject(L, 2, typeof(object));

                    UnityEngine.Debug.Assert(condition, message);



                    return(0);
                }
                if (__gen_param_count == 2 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1) && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    bool   condition = LuaAPI.lua_toboolean(L, 1);
                    string message   = LuaAPI.lua_tostring(L, 2);

                    UnityEngine.Debug.Assert(condition, message);



                    return(0);
                }
                if (__gen_param_count == 3 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1) && translator.Assignable <object>(L, 2) && translator.Assignable <UnityEngine.Object>(L, 3))
                {
                    bool               condition = LuaAPI.lua_toboolean(L, 1);
                    object             message   = translator.GetObject(L, 2, typeof(object));
                    UnityEngine.Object context   = (UnityEngine.Object)translator.GetObject(L, 3, typeof(UnityEngine.Object));

                    UnityEngine.Debug.Assert(condition, message, context);



                    return(0);
                }
                if (__gen_param_count == 3 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1) && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <UnityEngine.Object>(L, 3))
                {
                    bool               condition = LuaAPI.lua_toboolean(L, 1);
                    string             message   = LuaAPI.lua_tostring(L, 2);
                    UnityEngine.Object context   = (UnityEngine.Object)translator.GetObject(L, 3, typeof(UnityEngine.Object));

                    UnityEngine.Debug.Assert(condition, message, context);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Debug.Assert!"));
        }
Пример #28
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 9 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && translator.Assignable <DelegateBytes>(L, 4) && translator.Assignable <object>(L, 5) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 6) && (LuaAPI.lua_isnil(L, 7) || LuaAPI.lua_type(L, 7) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 8) || LuaAPI.lua_type(L, 8) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 9))
                {
                    string        _cmd             = LuaAPI.lua_tostring(L, 2);
                    byte[]        _data            = LuaAPI.lua_tobytes(L, 3);
                    DelegateBytes _successCallback = translator.GetDelegate <DelegateBytes>(L, 4);
                    object        _customerData    = translator.GetObject(L, 5, typeof(object));
                    bool          _cache           = LuaAPI.lua_toboolean(L, 6);
                    string        _version         = LuaAPI.lua_tostring(L, 7);
                    string        _serverUrl       = LuaAPI.lua_tostring(L, 8);
                    int           _httpTimeout     = LuaAPI.xlua_tointeger(L, 9);

                    XLua.LuaHttp gen_ret = new XLua.LuaHttp(_cmd, _data, _successCallback, _customerData, _cache, _version, _serverUrl, _httpTimeout);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 8 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && translator.Assignable <DelegateBytes>(L, 4) && translator.Assignable <object>(L, 5) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 6) && (LuaAPI.lua_isnil(L, 7) || LuaAPI.lua_type(L, 7) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 8) || LuaAPI.lua_type(L, 8) == LuaTypes.LUA_TSTRING))
                {
                    string        _cmd             = LuaAPI.lua_tostring(L, 2);
                    byte[]        _data            = LuaAPI.lua_tobytes(L, 3);
                    DelegateBytes _successCallback = translator.GetDelegate <DelegateBytes>(L, 4);
                    object        _customerData    = translator.GetObject(L, 5, typeof(object));
                    bool          _cache           = LuaAPI.lua_toboolean(L, 6);
                    string        _version         = LuaAPI.lua_tostring(L, 7);
                    string        _serverUrl       = LuaAPI.lua_tostring(L, 8);

                    XLua.LuaHttp gen_ret = new XLua.LuaHttp(_cmd, _data, _successCallback, _customerData, _cache, _version, _serverUrl);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 7 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && translator.Assignable <DelegateBytes>(L, 4) && translator.Assignable <object>(L, 5) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 6) && (LuaAPI.lua_isnil(L, 7) || LuaAPI.lua_type(L, 7) == LuaTypes.LUA_TSTRING))
                {
                    string        _cmd             = LuaAPI.lua_tostring(L, 2);
                    byte[]        _data            = LuaAPI.lua_tobytes(L, 3);
                    DelegateBytes _successCallback = translator.GetDelegate <DelegateBytes>(L, 4);
                    object        _customerData    = translator.GetObject(L, 5, typeof(object));
                    bool          _cache           = LuaAPI.lua_toboolean(L, 6);
                    string        _version         = LuaAPI.lua_tostring(L, 7);

                    XLua.LuaHttp gen_ret = new XLua.LuaHttp(_cmd, _data, _successCallback, _customerData, _cache, _version);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 6 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && translator.Assignable <DelegateBytes>(L, 4) && translator.Assignable <object>(L, 5) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 6))
                {
                    string        _cmd             = LuaAPI.lua_tostring(L, 2);
                    byte[]        _data            = LuaAPI.lua_tobytes(L, 3);
                    DelegateBytes _successCallback = translator.GetDelegate <DelegateBytes>(L, 4);
                    object        _customerData    = translator.GetObject(L, 5, typeof(object));
                    bool          _cache           = LuaAPI.lua_toboolean(L, 6);

                    XLua.LuaHttp gen_ret = new XLua.LuaHttp(_cmd, _data, _successCallback, _customerData, _cache);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 5 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && translator.Assignable <DelegateBytes>(L, 4) && translator.Assignable <object>(L, 5))
                {
                    string        _cmd             = LuaAPI.lua_tostring(L, 2);
                    byte[]        _data            = LuaAPI.lua_tobytes(L, 3);
                    DelegateBytes _successCallback = translator.GetDelegate <DelegateBytes>(L, 4);
                    object        _customerData    = translator.GetObject(L, 5, typeof(object));

                    XLua.LuaHttp gen_ret = new XLua.LuaHttp(_cmd, _data, _successCallback, _customerData);
                    translator.Push(L, 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 XLua.LuaHttp constructor!"));
        }
Пример #29
0
        static int _m_Simulate(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.ParticleSystem gen_to_be_invoked = (UnityEngine.ParticleSystem)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    float _t = (float)LuaAPI.lua_tonumber(L, 2);

                    gen_to_be_invoked.Simulate(_t);



                    return(0);
                }
                if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
                {
                    float _t            = (float)LuaAPI.lua_tonumber(L, 2);
                    bool  _withChildren = LuaAPI.lua_toboolean(L, 3);

                    gen_to_be_invoked.Simulate(_t, _withChildren);



                    return(0);
                }
                if (gen_param_count == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4))
                {
                    float _t            = (float)LuaAPI.lua_tonumber(L, 2);
                    bool  _withChildren = LuaAPI.lua_toboolean(L, 3);
                    bool  _restart      = LuaAPI.lua_toboolean(L, 4);

                    gen_to_be_invoked.Simulate(_t, _withChildren, _restart);



                    return(0);
                }
                if (gen_param_count == 5 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 5))
                {
                    float _t             = (float)LuaAPI.lua_tonumber(L, 2);
                    bool  _withChildren  = LuaAPI.lua_toboolean(L, 3);
                    bool  _restart       = LuaAPI.lua_toboolean(L, 4);
                    bool  _fixedTimeStep = LuaAPI.lua_toboolean(L, 5);

                    gen_to_be_invoked.Simulate(_t, _withChildren, _restart, _fixedTimeStep);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.ParticleSystem.Simulate!"));
        }
        static int _m_SetEase(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            DG.Tweening.TweenParams __cl_gen_to_be_invoked = (DG.Tweening.TweenParams)translator.FastGetCSObj(L, 1);


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 2 && translator.Assignable <UnityEngine.AnimationCurve>(L, 2))
                {
                    UnityEngine.AnimationCurve animCurve = (UnityEngine.AnimationCurve)translator.GetObject(L, 2, typeof(UnityEngine.AnimationCurve));

                    DG.Tweening.TweenParams __cl_gen_ret = __cl_gen_to_be_invoked.SetEase(animCurve);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 2 && translator.Assignable <DG.Tweening.EaseFunction>(L, 2))
                {
                    DG.Tweening.EaseFunction customEase = translator.GetDelegate <DG.Tweening.EaseFunction>(L, 2);

                    DG.Tweening.TweenParams __cl_gen_ret = __cl_gen_to_be_invoked.SetEase(customEase);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 4 && translator.Assignable <DG.Tweening.Ease>(L, 2) && translator.Assignable <System.Nullable <float> >(L, 3) && translator.Assignable <System.Nullable <float> >(L, 4))
                {
                    DG.Tweening.Ease        ease; translator.Get(L, 2, out ease);
                    System.Nullable <float> overshootOrAmplitude; translator.Get(L, 3, out overshootOrAmplitude);
                    System.Nullable <float> period; translator.Get(L, 4, out period);

                    DG.Tweening.TweenParams __cl_gen_ret = __cl_gen_to_be_invoked.SetEase(ease, overshootOrAmplitude, period);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 3 && translator.Assignable <DG.Tweening.Ease>(L, 2) && translator.Assignable <System.Nullable <float> >(L, 3))
                {
                    DG.Tweening.Ease        ease; translator.Get(L, 2, out ease);
                    System.Nullable <float> overshootOrAmplitude; translator.Get(L, 3, out overshootOrAmplitude);

                    DG.Tweening.TweenParams __cl_gen_ret = __cl_gen_to_be_invoked.SetEase(ease, overshootOrAmplitude);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 2 && translator.Assignable <DG.Tweening.Ease>(L, 2))
                {
                    DG.Tweening.Ease ease; translator.Get(L, 2, out ease);

                    DG.Tweening.TweenParams __cl_gen_ret = __cl_gen_to_be_invoked.SetEase(ease);
                    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 DG.Tweening.TweenParams.SetEase!"));
        }