Example #1
0
    static int Restart(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                DG.Tweening.Tween obj = (DG.Tweening.Tween)ToLua.CheckObject <DG.Tweening.Tween>(L, 1);
                obj.Restart();
                return(0);
            }
            else if (count == 2)
            {
                DG.Tweening.Tween obj = (DG.Tweening.Tween)ToLua.CheckObject <DG.Tweening.Tween>(L, 1);
                bool arg0             = LuaDLL.luaL_checkboolean(L, 2);
                obj.Restart(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: DG.Tweening.Tween.Restart"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int Restart(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        DG.Tweening.Tween obj = (DG.Tweening.Tween)LuaScriptMgr.GetNetObjectSelf(L, 1, "DG.Tweening.Tween");
        bool arg0             = LuaScriptMgr.GetBoolean(L, 2);

        obj.Restart(arg0);
        return(0);
    }
Example #3
0
 static int Restart(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         DG.Tweening.Tween obj = (DG.Tweening.Tween)ToLua.CheckObject(L, 1, typeof(DG.Tweening.Tween));
         bool arg0             = LuaDLL.luaL_checkboolean(L, 2);
         obj.Restart(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 /// <summary>
 /// Restarts the tween
 /// </summary>
 /// <param name="fromHere">If TRUE, re-evaluates the tween's start and end values from its current position.
 /// Set it to TRUE when spawning the same DOTweenAnimation in different positions (like when using a pooling system)</param>
 public override void DORestart(bool fromHere = false)
 {
     if (_tween == null)
     {
         if (Debugger.logPriority > 1)
         {
             Debugger.LogNullTween(_tween);
         }
         return;
     }
     if (fromHere && isRelative)
     {
         ReEvaluateRelativeTween();
     }
     _tween.Restart();
 }