static int Play(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3)
            {
                ShibaInu.RadialBlur obj = (ShibaInu.RadialBlur)ToLua.CheckObject <ShibaInu.RadialBlur>(L, 1);
                float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
                float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                obj.Play(arg0, arg1);
                return(0);
            }
            else if (count == 4)
            {
                ShibaInu.RadialBlur obj = (ShibaInu.RadialBlur)ToLua.CheckObject <ShibaInu.RadialBlur>(L, 1);
                float         arg0      = (float)LuaDLL.luaL_checknumber(L, 2);
                float         arg1      = (float)LuaDLL.luaL_checknumber(L, 3);
                System.Action arg2      = (System.Action)ToLua.CheckDelegate <System.Action>(L, 4);
                obj.Play(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: ShibaInu.RadialBlur.Play"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Exemplo n.º 2
0
        /// <summary>
        /// 播放径向模糊效果
        /// </summary>
        /// <returns>The radial blur.</returns>
        /// <param name="toBlurFactor">To blur factor.</param>
        /// <param name="duration">Duration.</param>
        /// <param name="callback">Callback.</param>
        /// <param name="cam">Cam.</param>
        public static RadialBlur PlayRadialBlur(float toBlurFactor, float duration, LuaFunction callback = null, Camera cam = null)
        {
            if (cam == null)
            {
                cam = Camera.main;
            }

            RadialBlur radialBlur = (RadialBlur)AddOrGetComponent(cam.gameObject, typeof(RadialBlur));

            if (radialBlur.shader == null)
            {
                radialBlur.shader = (Shader)ResManager.LoadAsset("Shaders/PostEffect/RadialBlur.shader", Stage.currentSceneName);
            }

            Action action = null;

            if (callback != null)
            {
                action = () => {
                    callback.BeginPCall();
                    callback.Call();
                    callback.EndPCall();
                }
            }
            ;
            radialBlur.Play(toBlurFactor, duration, action);
            return(radialBlur);
        }
    static int get_material(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ShibaInu.RadialBlur  obj = (ShibaInu.RadialBlur)o;
            UnityEngine.Material ret = obj.material;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index material on a nil value"));
        }
    }
    static int get_shader(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ShibaInu.RadialBlur obj = (ShibaInu.RadialBlur)o;
            UnityEngine.Shader  ret = obj.shader;
            ToLua.PushSealed(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index shader on a nil value"));
        }
    }
    static int set_centerY(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ShibaInu.RadialBlur obj = (ShibaInu.RadialBlur)o;
            float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.centerY = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index centerY on a nil value"));
        }
    }
    static int set_material(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ShibaInu.RadialBlur  obj  = (ShibaInu.RadialBlur)o;
            UnityEngine.Material arg0 = (UnityEngine.Material)ToLua.CheckObject <UnityEngine.Material>(L, 2);
            obj.material = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index material on a nil value"));
        }
    }
    static int set_shader(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ShibaInu.RadialBlur obj  = (ShibaInu.RadialBlur)o;
            UnityEngine.Shader  arg0 = (UnityEngine.Shader)ToLua.CheckObject(L, 2, typeof(UnityEngine.Shader));
            obj.shader = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index shader on a nil value"));
        }
    }
    static int get_centerY(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ShibaInu.RadialBlur obj = (ShibaInu.RadialBlur)o;
            float ret = obj.centerY;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index centerY on a nil value"));
        }
    }
Exemplo n.º 9
0
    static int PlayRadialBlur(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                float arg0            = (float)LuaDLL.luaL_checknumber(L, 1);
                float arg1            = (float)LuaDLL.luaL_checknumber(L, 2);
                ShibaInu.RadialBlur o = ShibaInu.LuaHelper.PlayRadialBlur(arg0, arg1);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 3)
            {
                float               arg0 = (float)LuaDLL.luaL_checknumber(L, 1);
                float               arg1 = (float)LuaDLL.luaL_checknumber(L, 2);
                LuaFunction         arg2 = ToLua.CheckLuaFunction(L, 3);
                ShibaInu.RadialBlur o    = ShibaInu.LuaHelper.PlayRadialBlur(arg0, arg1, arg2);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 4)
            {
                float               arg0 = (float)LuaDLL.luaL_checknumber(L, 1);
                float               arg1 = (float)LuaDLL.luaL_checknumber(L, 2);
                LuaFunction         arg2 = ToLua.CheckLuaFunction(L, 3);
                UnityEngine.Camera  arg3 = (UnityEngine.Camera)ToLua.CheckObject(L, 4, typeof(UnityEngine.Camera));
                ShibaInu.RadialBlur o    = ShibaInu.LuaHelper.PlayRadialBlur(arg0, arg1, arg2, arg3);
                ToLua.Push(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: ShibaInu.LuaHelper.PlayRadialBlur"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }