コード例 #1
0
    private static int CancelInvoke(IntPtr L)
    {
        int result;

        try
        {
            int num = LuaDLL.lua_gettop(L);
            if (num == 1 && TypeChecker.CheckTypes(L, 1, typeof(MonoBehaviour)))
            {
                MonoBehaviour monoBehaviour = (MonoBehaviour)ToLua.ToObject(L, 1);
                monoBehaviour.CancelInvoke();
                result = 0;
            }
            else if (num == 2 && TypeChecker.CheckTypes(L, 1, typeof(MonoBehaviour), typeof(string)))
            {
                MonoBehaviour monoBehaviour2 = (MonoBehaviour)ToLua.ToObject(L, 1);
                string        methodName     = ToLua.ToString(L, 2);
                monoBehaviour2.CancelInvoke(methodName);
                result = 0;
            }
            else
            {
                result = LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.MonoBehaviour.CancelInvoke");
            }
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }
コード例 #2
0
ファイル: Util.cs プロジェクト: lingxiao20170713/liuyun
 public static void CancelInvoke(string strFunName)
 {
     if (!ReferenceEquals(null, Mono))
     {
         Mono.CancelInvoke(strFunName);
     }
 }
コード例 #3
0
 public override void OnExit()
 {
     if (!(component == null) && cancelOnExit.Value)
     {
         component.CancelInvoke(methodName.Value);
     }
 }
コード例 #4
0
        public override void OnExit()
        {
            if (component == null)
            {
                return;
            }

            if (cancelOnExit.Value)
            {
                component.CancelInvoke(methodName);
            }
        }
コード例 #5
0
        public void Trigger()
        {
            if (Chance != 1f && UnityEngine.Random.value > Chance)
            {
                return;
            }

            if (view.IsInvoking(deactivator))
            {
                view.CancelInvoke(deactivator);
            }
            else
            {
                activator();
            }

            view.Invoke(deactivator, Duration);
        }
コード例 #6
0
    private static int CancelInvoke(IntPtr L)
    {
        switch (LuaDLL.lua_gettop(L))
        {
        case 1:
            ((MonoBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "MonoBehaviour")).CancelInvoke();
            return(0);

        case 2:
        {
            MonoBehaviour behaviour2 = (MonoBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "MonoBehaviour");
            string        luaString  = LuaScriptMgr.GetLuaString(L, 2);
            behaviour2.CancelInvoke(luaString);
            return(0);
        }
        }
        LuaDLL.luaL_error(L, "invalid arguments to method: MonoBehaviour.CancelInvoke");
        return(0);
    }
コード例 #7
0
    private static int CancelInvoke(IntPtr L)
    {
        int num = LuaDLL.lua_gettop(L);

        if (num == 1)
        {
            MonoBehaviour monoBehaviour = (MonoBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "MonoBehaviour");
            monoBehaviour.CancelInvoke();
            return(0);
        }
        if (num == 2)
        {
            MonoBehaviour monoBehaviour2 = (MonoBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "MonoBehaviour");
            string        luaString      = LuaScriptMgr.GetLuaString(L, 2);
            monoBehaviour2.CancelInvoke(luaString);
            return(0);
        }
        LuaDLL.luaL_error(L, "invalid arguments to method: MonoBehaviour.CancelInvoke");
        return(0);
    }
コード例 #8
0
    static int CancelInvoke(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 1)
        {
            MonoBehaviour obj = (MonoBehaviour)L.ChkUnityObjectSelf(1, "MonoBehaviour");
            obj.CancelInvoke();
            return(0);
        }
        else if (count == 2)
        {
            MonoBehaviour obj  = (MonoBehaviour)L.ChkUnityObjectSelf(1, "MonoBehaviour");
            var           arg0 = L.ToLuaString(2);
            obj.CancelInvoke(arg0);
            return(0);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: MonoBehaviour.CancelInvoke");
        }

        return(0);
    }
コード例 #9
0
    public static int CancelInvoke(IntPtr l)
    {
        int result;

        try
        {
            int num = LuaDLL.lua_gettop(l);
            if (num == 1)
            {
                MonoBehaviour monoBehaviour = (MonoBehaviour)LuaObject.checkSelf(l);
                monoBehaviour.CancelInvoke();
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else if (num == 2)
            {
                MonoBehaviour monoBehaviour2 = (MonoBehaviour)LuaObject.checkSelf(l);
                string        methodName;
                LuaObject.checkType(l, 2, out methodName);
                monoBehaviour2.CancelInvoke(methodName);
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else
            {
                LuaObject.pushValue(l, false);
                LuaDLL.lua_pushstring(l, "No matched override function CancelInvoke to call");
                result = 2;
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
コード例 #10
0
    static int CancelInvoke(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 1)
        {
            MonoBehaviour obj = LuaScriptMgr.GetNetObject <MonoBehaviour>(L, 1);
            obj.CancelInvoke();
            return(0);
        }
        else if (count == 2)
        {
            MonoBehaviour obj  = LuaScriptMgr.GetNetObject <MonoBehaviour>(L, 1);
            string        arg0 = LuaScriptMgr.GetLuaString(L, 2);
            obj.CancelInvoke(arg0);
            return(0);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: MonoBehaviour.CancelInvoke");
        }

        return(0);
    }
コード例 #11
0
    static int CancelInvoke(IntPtr l)
    {
        int count = LuaDLL.lua_gettop(l);

        if (count == 1)
        {
            MonoBehaviour obj = (MonoBehaviour)luaMgr.GetNetObject(1);
            obj.CancelInvoke();
            return(0);
        }
        else if (count == 2)
        {
            MonoBehaviour obj  = (MonoBehaviour)luaMgr.GetNetObject(1);
            string        arg0 = luaMgr.GetString(2);
            obj.CancelInvoke(arg0);
            return(0);
        }
        else
        {
            LuaDLL.luaL_error(l, "The best overloaded method match for 'MonoBehaviour.CancelInvoke' has some invalid arguments");
        }

        return(0);
    }
コード例 #12
0
 new public static void CancelInvoke()
 {
     ins.CancelInvoke();
 }
コード例 #13
0
 public static void CancelInvoke(this MonoBehaviour behaviour, System.Action method)
 {
     behaviour.CancelInvoke(method.Method.Name);
 }
コード例 #14
0
 /**
  *      Cancels the action if it was scheduled.
  */
 public static void CancelInvoke(this MonoBehaviour component, System.Action action)
 {
     component.CancelInvoke(action.Method.Name);
 }
コード例 #15
0
 public void stopSchedule()
 {
     script.CancelInvoke(updateFunctionName);
 }
コード例 #16
0
 public static void CancelInvoke(this MonoBehaviour b, Action method)
 {
     b.CancelInvoke(method.Method.Name);
 }
コード例 #17
0
ファイル: Utils.cs プロジェクト: dsapandora/clash-of-clones
 public static void CancelInvoke(this MonoBehaviour behaviour, Action action)
 {
     behaviour.CancelInvoke(action.Method.Name);
 }
コード例 #18
0
 /// <summary>
 /// Cancels all Invoke calls task on this behaviour.
 /// </summary>
 public static void CancelInvoke(this MonoBehaviour mono, OakTask task)
 {
     mono.CancelInvoke(task.Method.Name);
 }