示例#1
0
        public void Abort(AbortMethod abortMethod)
        {
            if (Tween == null || !Tween.IsPlaying())
            {
                return;
            }

            if (abortMethod == AbortMethod.JustKill)
            {
                Tween.Kill();
            }
            else if (abortMethod == AbortMethod.ForceCompleteWithKillCallback)
            {
                Tween.OnComplete(null);
                Tween.Complete();
            }
            else if (abortMethod == AbortMethod.ForceCompleteWithOnCompleteCallback)
            {
                Tween.OnKill(null);
                Tween.Complete();
            }
            else if (abortMethod == AbortMethod.ForceCompleteWithOnCompleteAndOnKill)
            {
                Tween.Kill(true);
            }

            Tween = null;
        }
 static int OnKill(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         DG.Tweening.Tween         obj  = (DG.Tweening.Tween)ToLua.CheckObject <DG.Tweening.Tween>(L, 1);
         DG.Tweening.TweenCallback arg0 = (DG.Tweening.TweenCallback)ToLua.CheckDelegate <DG.Tweening.TweenCallback>(L, 2);
         DG.Tweening.Tween         o    = obj.OnKill(arg0);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int OnKill(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        DG.Tweening.Tween         obj  = (DG.Tweening.Tween)LuaScriptMgr.GetNetObjectSelf(L, 1, "DG.Tweening.Tween");
        DG.Tweening.TweenCallback arg0 = null;
        LuaTypes funcType2             = LuaDLL.lua_type(L, 2);

        if (funcType2 != LuaTypes.LUA_TFUNCTION)
        {
            arg0 = (DG.Tweening.TweenCallback)LuaScriptMgr.GetNetObject(L, 2, typeof(DG.Tweening.TweenCallback));
        }
        else
        {
            LuaFunction func = LuaScriptMgr.GetLuaFunction(L, 2);
            arg0 = () =>
            {
                func.Call();
            };
        }

        DG.Tweening.Tween o = obj.OnKill(arg0);
        LuaScriptMgr.PushObject(L, o);
        return(1);
    }