IsInvoking() public method

public IsInvoking ( ) : bool
return bool
    static int IsInvoking(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1 && TypeChecker.CheckTypes <UnityEngine.MonoBehaviour>(L, 1))
            {
                UnityEngine.MonoBehaviour obj = (UnityEngine.MonoBehaviour)ToLua.ToObject(L, 1);
                bool o = obj.IsInvoking();
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <UnityEngine.MonoBehaviour, string>(L, 1))
            {
                UnityEngine.MonoBehaviour obj = (UnityEngine.MonoBehaviour)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                bool   o    = obj.IsInvoking(arg0);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.MonoBehaviour.IsInvoking"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Example #2
0
 static public int IsInvoking(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             UnityEngine.MonoBehaviour self = (UnityEngine.MonoBehaviour)checkSelf(l);
             var ret = self.IsInvoking();
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 2)
         {
             UnityEngine.MonoBehaviour self = (UnityEngine.MonoBehaviour)checkSelf(l);
             System.String             a1;
             checkType(l, 2, out a1);
             var ret = self.IsInvoking(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #3
0
 static int QPYX_IsInvoking_YXQP(IntPtr L_YXQP)
 {
     try
     {
         int QPYX_count_YXQP = LuaDLL.lua_gettop(L_YXQP);
         if (QPYX_count_YXQP == 1)
         {
             UnityEngine.MonoBehaviour QPYX_obj_YXQP = (UnityEngine.MonoBehaviour)ToLua.CheckObject <UnityEngine.MonoBehaviour>(L_YXQP, 1);
             bool QPYX_o_YXQP = QPYX_obj_YXQP.IsInvoking();
             LuaDLL.lua_pushboolean(L_YXQP, QPYX_o_YXQP);
             return(1);
         }
         else if (QPYX_count_YXQP == 2)
         {
             UnityEngine.MonoBehaviour QPYX_obj_YXQP = (UnityEngine.MonoBehaviour)ToLua.CheckObject <UnityEngine.MonoBehaviour>(L_YXQP, 1);
             string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2);
             bool   QPYX_o_YXQP    = QPYX_obj_YXQP.IsInvoking(QPYX_arg0_YXQP);
             LuaDLL.lua_pushboolean(L_YXQP, QPYX_o_YXQP);
             return(1);
         }
         else
         {
             return(LuaDLL.luaL_throw(L_YXQP, "invalid arguments to method: UnityEngine.MonoBehaviour.IsInvoking"));
         }
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
 static public int IsInvoking(IntPtr l)
 {
     try{
         if (matchType(l, 2, typeof(string)))
         {
             UnityEngine.MonoBehaviour self = (UnityEngine.MonoBehaviour)checkSelf(l);
             System.String             a1;
             checkType(l, 2, out a1);
             System.Boolean ret = self.IsInvoking(a1);
             pushValue(l, ret);
             return(1);
         }
         else if (matchType(l, 2))
         {
             UnityEngine.MonoBehaviour self = (UnityEngine.MonoBehaviour)checkSelf(l);
             System.Boolean            ret  = self.IsInvoking();
             pushValue(l, ret);
             return(1);
         }
         LuaDLL.luaL_error(l, "No matched override function to call");
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
    static int IsInvoking(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("UnityEngine.MonoBehaviour.Register");
#endif
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                UnityEngine.MonoBehaviour obj = (UnityEngine.MonoBehaviour)ToLua.CheckObject <UnityEngine.MonoBehaviour>(L, 1);
                bool o = obj.IsInvoking();
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else if (count == 2)
            {
                UnityEngine.MonoBehaviour obj = (UnityEngine.MonoBehaviour)ToLua.CheckObject <UnityEngine.MonoBehaviour>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                bool   o    = obj.IsInvoking(arg0);
                LuaDLL.lua_pushboolean(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.MonoBehaviour.IsInvoking"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Example #6
0
        //
        // Invoke in x seconds, but only if we're not already invoking
        //
        public static void InvokeAtomic(this MonoBehaviour mb, string strName, float fDelay)
        {
            UnityEngine.Profiling.Profiler.BeginSample("InvokeAtomic");

            if (!mb.IsInvoking(strName))
            {
                mb.Invoke(strName, fDelay);
            }

            UnityEngine.Profiling.Profiler.EndSample();
        }
 static public int IsInvoking(IntPtr l)
 {
     try {
         UnityEngine.MonoBehaviour self = (UnityEngine.MonoBehaviour)checkSelf(l);
         var ret = self.IsInvoking();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #8
0
 static public int IsInvoking(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             UnityEngine.MonoBehaviour self = (UnityEngine.MonoBehaviour)checkSelf(l);
             var ret = self.IsInvoking();
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 2)
         {
             UnityEngine.MonoBehaviour self = (UnityEngine.MonoBehaviour)checkSelf(l);
             System.String             a1;
             checkType(l, 2, out a1);
             var ret = self.IsInvoking(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function IsInvoking to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Example #9
0
 public static int IsInvoking1_wrap(long L)
 {
     try
     {
         long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L);
         UnityEngine.MonoBehaviour obj = get_obj(nThisPtr);
         bool ret     = obj.IsInvoking();
         long ret_ptr = FCLibHelper.fc_get_return_ptr(L);
         FCLibHelper.fc_set_value_bool(ret_ptr, ret);
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
     return(0);
 }
    static int IsInvoking(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 1 && ToLua.CheckTypes(L, 1, typeof(UnityEngine.MonoBehaviour)))
        {
            UnityEngine.MonoBehaviour obj = (UnityEngine.MonoBehaviour)ToLua.ToObject(L, 1);
            bool o;

            try
            {
                o = obj.IsInvoking();
            }
            catch (Exception e)
            {
                return(LuaDLL.toluaL_exception(L, e));
            }

            LuaDLL.lua_pushboolean(L, o);
            return(1);
        }
        else if (count == 2 && ToLua.CheckTypes(L, 1, typeof(UnityEngine.MonoBehaviour), typeof(string)))
        {
            UnityEngine.MonoBehaviour obj = (UnityEngine.MonoBehaviour)ToLua.ToObject(L, 1);
            string arg0 = ToLua.ToString(L, 2);
            bool   o;

            try
            {
                o = obj.IsInvoking(arg0);
            }
            catch (Exception e)
            {
                return(LuaDLL.toluaL_exception(L, e));
            }

            LuaDLL.lua_pushboolean(L, o);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: UnityEngine.MonoBehaviour.IsInvoking");
        }

        return(0);
    }
Example #11
0
 public static bool IsInvoking(this MonoBehaviour mono, Task task, float time, float repeatRate)
 {
     return(mono.IsInvoking(task.Method.Name));
 }
Example #12
0
 public bool IsInvoking(string methodName)
 {
     return(MonoBehaviour.IsInvoking(this, methodName));
 }