/// <summary> /// 播放叠影抖动效果 /// </summary> /// <returns>The double image shake.</returns> /// <param name="duration">Duration.</param> /// <param name="callback">Callback.</param> /// <param name="x">The x coordinate.</param> /// <param name="y">The y coordinate.</param> /// <param name="interval">Interval.</param> /// <param name="cam">Cam.</param> public static DoubleImageShake PlayDoubleImageShake(float duration, LuaFunction callback = null, float x = 35f, float y = 10f, float interval = 0.045f, Camera cam = null) { if (cam == null) { cam = Camera.main; } DoubleImageShake dis = (DoubleImageShake)AddOrGetComponent(cam.gameObject, typeof(DoubleImageShake)); if (dis.shader == null) { dis.shader = (Shader)ResManager.LoadAsset("Shaders/PostEffect/DoubleImageShake.shader", Stage.currentSceneName); } Action action = null; if (callback != null) { action = () => { callback.BeginPCall(); callback.Call(); callback.EndPCall(); } } ; dis.Play(duration, action, x, y, interval); return(dis); }
static int set_shakeInterval(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); ShibaInu.DoubleImageShake obj = (ShibaInu.DoubleImageShake)o; float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.shakeInterval = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index shakeInterval on a nil value")); } }
static int set_material(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); ShibaInu.DoubleImageShake obj = (ShibaInu.DoubleImageShake)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_shakeRange(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); ShibaInu.DoubleImageShake obj = (ShibaInu.DoubleImageShake)o; UnityEngine.Vector2 arg0 = ToLua.ToVector2(L, 2); obj.shakeRange = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index shakeRange on a nil value")); } }
static int set_shader(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); ShibaInu.DoubleImageShake obj = (ShibaInu.DoubleImageShake)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_shakeInterval(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); ShibaInu.DoubleImageShake obj = (ShibaInu.DoubleImageShake)o; float ret = obj.shakeInterval; LuaDLL.lua_pushnumber(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index shakeInterval on a nil value")); } }
static int get_shakeRange(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); ShibaInu.DoubleImageShake obj = (ShibaInu.DoubleImageShake)o; UnityEngine.Vector2 ret = obj.shakeRange; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index shakeRange on a nil value")); } }
static int Play(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2) { ShibaInu.DoubleImageShake obj = (ShibaInu.DoubleImageShake)ToLua.CheckObject <ShibaInu.DoubleImageShake>(L, 1); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.Play(arg0); return(0); } else if (count == 3) { ShibaInu.DoubleImageShake obj = (ShibaInu.DoubleImageShake)ToLua.CheckObject <ShibaInu.DoubleImageShake>(L, 1); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); System.Action arg1 = (System.Action)ToLua.CheckDelegate <System.Action>(L, 3); obj.Play(arg0, arg1); return(0); } else if (count == 4) { ShibaInu.DoubleImageShake obj = (ShibaInu.DoubleImageShake)ToLua.CheckObject <ShibaInu.DoubleImageShake>(L, 1); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); System.Action arg1 = (System.Action)ToLua.CheckDelegate <System.Action>(L, 3); float arg2 = (float)LuaDLL.luaL_checknumber(L, 4); obj.Play(arg0, arg1, arg2); return(0); } else if (count == 5) { ShibaInu.DoubleImageShake obj = (ShibaInu.DoubleImageShake)ToLua.CheckObject <ShibaInu.DoubleImageShake>(L, 1); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); System.Action arg1 = (System.Action)ToLua.CheckDelegate <System.Action>(L, 3); float arg2 = (float)LuaDLL.luaL_checknumber(L, 4); float arg3 = (float)LuaDLL.luaL_checknumber(L, 5); obj.Play(arg0, arg1, arg2, arg3); return(0); } else if (count == 6) { ShibaInu.DoubleImageShake obj = (ShibaInu.DoubleImageShake)ToLua.CheckObject <ShibaInu.DoubleImageShake>(L, 1); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); System.Action arg1 = (System.Action)ToLua.CheckDelegate <System.Action>(L, 3); float arg2 = (float)LuaDLL.luaL_checknumber(L, 4); float arg3 = (float)LuaDLL.luaL_checknumber(L, 5); float arg4 = (float)LuaDLL.luaL_checknumber(L, 6); obj.Play(arg0, arg1, arg2, arg3, arg4); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: ShibaInu.DoubleImageShake.Play")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int PlayDoubleImageShake(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { float arg0 = (float)LuaDLL.luaL_checknumber(L, 1); ShibaInu.DoubleImageShake o = ShibaInu.LuaHelper.PlayDoubleImageShake(arg0); ToLua.Push(L, o); return(1); } else if (count == 2) { float arg0 = (float)LuaDLL.luaL_checknumber(L, 1); LuaFunction arg1 = ToLua.CheckLuaFunction(L, 2); ShibaInu.DoubleImageShake o = ShibaInu.LuaHelper.PlayDoubleImageShake(arg0, arg1); ToLua.Push(L, o); return(1); } else if (count == 3) { float arg0 = (float)LuaDLL.luaL_checknumber(L, 1); LuaFunction arg1 = ToLua.CheckLuaFunction(L, 2); float arg2 = (float)LuaDLL.luaL_checknumber(L, 3); ShibaInu.DoubleImageShake o = ShibaInu.LuaHelper.PlayDoubleImageShake(arg0, arg1, arg2); ToLua.Push(L, o); return(1); } else if (count == 4) { float arg0 = (float)LuaDLL.luaL_checknumber(L, 1); LuaFunction arg1 = ToLua.CheckLuaFunction(L, 2); float arg2 = (float)LuaDLL.luaL_checknumber(L, 3); float arg3 = (float)LuaDLL.luaL_checknumber(L, 4); ShibaInu.DoubleImageShake o = ShibaInu.LuaHelper.PlayDoubleImageShake(arg0, arg1, arg2, arg3); ToLua.Push(L, o); return(1); } else if (count == 5) { float arg0 = (float)LuaDLL.luaL_checknumber(L, 1); LuaFunction arg1 = ToLua.CheckLuaFunction(L, 2); float arg2 = (float)LuaDLL.luaL_checknumber(L, 3); float arg3 = (float)LuaDLL.luaL_checknumber(L, 4); float arg4 = (float)LuaDLL.luaL_checknumber(L, 5); ShibaInu.DoubleImageShake o = ShibaInu.LuaHelper.PlayDoubleImageShake(arg0, arg1, arg2, arg3, arg4); ToLua.Push(L, o); return(1); } else if (count == 6) { float arg0 = (float)LuaDLL.luaL_checknumber(L, 1); LuaFunction arg1 = ToLua.CheckLuaFunction(L, 2); float arg2 = (float)LuaDLL.luaL_checknumber(L, 3); float arg3 = (float)LuaDLL.luaL_checknumber(L, 4); float arg4 = (float)LuaDLL.luaL_checknumber(L, 5); UnityEngine.Camera arg5 = (UnityEngine.Camera)ToLua.CheckObject(L, 6, typeof(UnityEngine.Camera)); ShibaInu.DoubleImageShake o = ShibaInu.LuaHelper.PlayDoubleImageShake(arg0, arg1, arg2, arg3, arg4, arg5); ToLua.Push(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: ShibaInu.LuaHelper.PlayDoubleImageShake")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }