static int Ease(IntPtr L) { try { ToLua.CheckArgsCount(L, 5); ToLuaUIFramework.BTween obj = (ToLuaUIFramework.BTween)ToLua.CheckObject <ToLuaUIFramework.BTween>(L, 1); double arg0 = (double)LuaDLL.luaL_checknumber(L, 2); double arg1 = (double)LuaDLL.luaL_checknumber(L, 3); double arg2 = (double)LuaDLL.luaL_checknumber(L, 4); double arg3 = (double)LuaDLL.luaL_checknumber(L, 5); double o = obj.Ease(arg0, arg1, arg2, arg3); LuaDLL.lua_pushnumber(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int _CreateToLuaUIFramework_BTween(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { ToLuaUIFramework.BTween obj = new ToLuaUIFramework.BTween(); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: ToLuaUIFramework.BTween.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public void Value(float delay, float startValue, float toValue, float time, BTween.BEaseType method, Action <float> updateEvent, Action finishEvent) { this.delay = delay; this.toValue = toValue; t = 0f; b = startValue; c = this.toValue - b; d = time; this.UpdateEvent = updateEvent; this.FinishEvent = finishEvent; switch (method) { case BTween.BEaseType.Linear: tween = new LinearEase(); break; case BTween.BEaseType.ExpoIn: tween = new ExpoEaseIn(); break; case BTween.BEaseType.ExpoOut: tween = new ExpoEaseOut(); break; case BTween.BEaseType.ExpoInOut: tween = new ExpoEaseInOut(); break; case BTween.BEaseType.SineIn: tween = new SineEaseIn(); break; case BTween.BEaseType.SineOut: tween = new SineEaseOut(); break; case BTween.BEaseType.SineInOut: tween = new SineEaseInOut(); break; case BTween.BEaseType.ElasticIn: tween = new ElasticEaseIn(); break; case BTween.BEaseType.ElasticOut: tween = new ElasticEaseOut(); break; case BTween.BEaseType.ElasticInOut: tween = new ElasticEaseInOut(); break; case BTween.BEaseType.BackIn: tween = new BackEaseIn(); break; case BTween.BEaseType.BackOut: tween = new BackEaseOut(); break; case BTween.BEaseType.BackInOut: tween = new BackEaseInOut(); break; case BTween.BEaseType.BounceIn: tween = new BounceEaseIn(); break; case BTween.BEaseType.BounceOut: tween = new BounceEaseOut(); break; case BTween.BEaseType.BounceInOut: tween = new BounceEaseInOut(); break; default: tween = new SineEaseOut(); break; } }