/// <summary> /// 加速运动 /// </summary> /// <param name="luaState"></param> /// <returns></returns> public static int SetBgSpriteObjectAcce(ILuaState luaState) { BgSpriteObject spObj = luaState.ToUserData(-3) as BgSpriteObject; float acce = (float)luaState.ToNumber(-2); float angle = (float)luaState.ToNumber(-1); luaState.Pop(3); spObj.SetAcce(acce, angle); return(0); }
/// <summary> /// 有限制的加速运动 /// <para>acce</para> /// <para>angle</para> /// <para>duration</para> /// </summary> /// <param name="luaState"></param> /// <returns></returns> public static int SetBgSpriteObjectAcceWithLimitation(ILuaState luaState) { BgSpriteObject spObj = luaState.ToUserData(-4) as BgSpriteObject; float acce = (float)luaState.ToNumber(-3); float angle = (float)luaState.ToNumber(-2); int duration = luaState.ToInteger(-1); luaState.Pop(4); spObj.SetAcce(acce, angle, duration); return(0); }