//数值变化Tween public static ValueUpdate Value(float delay, float startValue, float toValue, float time, BEaseType method, Action <float> updateEvent, Action finishEvent = null) { GameObject go = new GameObject("ValueTween"); ValueUpdate valueUpdate = go.GetComponent <ValueUpdate>(); if (!valueUpdate) { valueUpdate = go.AddComponent <ValueUpdate>(); } valueUpdate.Value(delay, startValue, toValue, time, method, updateEvent, finishEvent); return(valueUpdate); }
static int Value(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 6) { float arg0 = (float)LuaDLL.luaL_checknumber(L, 1); float arg1 = (float)LuaDLL.luaL_checknumber(L, 2); float arg2 = (float)LuaDLL.luaL_checknumber(L, 3); float arg3 = (float)LuaDLL.luaL_checknumber(L, 4); ToLuaUIFramework.BTween.BEaseType arg4 = (ToLuaUIFramework.BTween.BEaseType)ToLua.CheckObject(L, 5, typeof(ToLuaUIFramework.BTween.BEaseType)); System.Action <float> arg5 = (System.Action <float>)ToLua.CheckDelegate <System.Action <float> >(L, 6); ToLuaUIFramework.ValueUpdate o = ToLuaUIFramework.BTween.Value(arg0, arg1, arg2, arg3, arg4, arg5); ToLua.Push(L, o); return(1); } else if (count == 7) { float arg0 = (float)LuaDLL.luaL_checknumber(L, 1); float arg1 = (float)LuaDLL.luaL_checknumber(L, 2); float arg2 = (float)LuaDLL.luaL_checknumber(L, 3); float arg3 = (float)LuaDLL.luaL_checknumber(L, 4); ToLuaUIFramework.BTween.BEaseType arg4 = (ToLuaUIFramework.BTween.BEaseType)ToLua.CheckObject(L, 5, typeof(ToLuaUIFramework.BTween.BEaseType)); System.Action <float> arg5 = (System.Action <float>)ToLua.CheckDelegate <System.Action <float> >(L, 6); System.Action arg6 = (System.Action)ToLua.CheckDelegate <System.Action>(L, 7); ToLuaUIFramework.ValueUpdate o = ToLuaUIFramework.BTween.Value(arg0, arg1, arg2, arg3, arg4, arg5, arg6); ToLua.Push(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: ToLuaUIFramework.BTween.Value")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }