static int IsComplete(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        DG.Tweening.Tween obj = (DG.Tweening.Tween)LuaScriptMgr.GetNetObjectSelf(L, 1, "DG.Tweening.Tween");
        bool o = obj.IsComplete();

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Esempio n. 2
0
 static int IsComplete(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         DG.Tweening.Tween obj = (DG.Tweening.Tween)ToLua.CheckObject <DG.Tweening.Tween>(L, 1);
         bool o = obj.IsComplete();
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 /// <summary>
 /// Returns an async <see cref="Task"/> that waits until the tween is killed or complete.
 /// It can be used inside an async operation.
 /// <para>Example usage:</para><code>await myTween.WaitForCompletion();</code>
 /// </summary>
 public static async Task AsyncWaitForCompletion(this Tween t)
 {
     if (!t.active)
     {
         if (Debugger.logPriority > 0)
         {
             Debugger.LogInvalidTween(t);
         }
         return;
     }
     while (t.active && !t.IsComplete())
     {
         await Task.Yield();
     }
 }