static int Play(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3) { ShibaInu.Mosaic obj = (ShibaInu.Mosaic)ToLua.CheckObject <ShibaInu.Mosaic>(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.Mosaic obj = (ShibaInu.Mosaic)ToLua.CheckObject <ShibaInu.Mosaic>(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.Mosaic.Play")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
/// <summary> /// 播放马赛克效果 /// </summary> /// <returns>The mosaic.</returns> /// <param name="toTileSize">To tile size.</param> /// <param name="duration">Duration.</param> /// <param name="callback">Callback.</param> /// <param name="cam">Cam.</param> public static Mosaic PlayMosaic(float toTileSize, float duration, LuaFunction callback = null, Camera cam = null) { if (cam == null) { cam = Camera.main; } Mosaic mosaic = (Mosaic)AddOrGetComponent(cam.gameObject, typeof(Mosaic)); if (mosaic.shader == null) { mosaic.shader = (Shader)ResManager.LoadAsset("Shaders/PostEffect/Mosaic.shader", Stage.currentSceneName); } Action action = null; if (callback != null) { action = () => { callback.BeginPCall(); callback.Call(); callback.EndPCall(); } } ; mosaic.Play(toTileSize, duration, action); return(mosaic); }
static int get_material(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); ShibaInu.Mosaic obj = (ShibaInu.Mosaic)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.Mosaic obj = (ShibaInu.Mosaic)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_tileSize(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); ShibaInu.Mosaic obj = (ShibaInu.Mosaic)o; float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.tileSize = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index tileSize on a nil value")); } }
static int set_material(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); ShibaInu.Mosaic obj = (ShibaInu.Mosaic)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.Mosaic obj = (ShibaInu.Mosaic)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_tileSize(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); ShibaInu.Mosaic obj = (ShibaInu.Mosaic)o; float ret = obj.tileSize; LuaDLL.lua_pushnumber(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index tileSize on a nil value")); } }
static int PlayMosaic(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.Mosaic o = ShibaInu.LuaHelper.PlayMosaic(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.Mosaic o = ShibaInu.LuaHelper.PlayMosaic(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.Mosaic o = ShibaInu.LuaHelper.PlayMosaic(arg0, arg1, arg2, arg3); ToLua.Push(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: ShibaInu.LuaHelper.PlayMosaic")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }