//this source code was auto-generated by tolua#, do not modify it
using System;
using LuaInterface;

public class DelayCallMgrWrap
{
	public static void Register(LuaState L)
	{
		L.BeginClass(typeof(DelayCallMgr), typeof(UnityEngine.MonoBehaviour));
		L.RegFunction("Call", Call);
		L.RegFunction("Cancel", Cancel);
		L.RegFunction("Clear", Clear);
		L.RegFunction("__eq", op_Equality);
		L.RegFunction("__tostring", ToLua.op_ToString);
		L.RegVar("instance", get_instance, null);
		L.EndClass();
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int Call(IntPtr L)
	{
		try
		{
			int count = LuaDLL.lua_gettop(L);

			if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(DelayCallMgr), typeof(float), typeof(System.Action)))
			{
				DelayCallMgr obj = (DelayCallMgr)ToLua.ToObject(L, 1);
				float arg0 = (float)LuaDLL.lua_tonumber(L, 2);
				System.Action arg1 = null;
				LuaTypes funcType3 = LuaDLL.lua_type(L, 3);

				if (funcType3 != LuaTypes.LUA_TFUNCTION)
				{
					 arg1 = (System.Action)ToLua.ToObject(L, 3);
				}
				else
				{
					LuaFunction func = ToLua.ToLuaFunction(L, 3);
					arg1 = DelegateFactory.CreateDelegate(typeof(System.Action), func) as System.Action;
				}

				obj.Call(arg0, arg1);
				return 0;
			}
			else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(DelayCallMgr), typeof(float), typeof(LuaInterface.LuaFunction)))
			{
				DelayCallMgr obj = (DelayCallMgr)ToLua.ToObject(L, 1);
				float arg0 = (float)LuaDLL.lua_tonumber(L, 2);
				LuaFunction arg1 = ToLua.ToLuaFunction(L, 3);
				obj.Call(arg0, arg1);
				return 0;
			}
			else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(DelayCallMgr), typeof(string), typeof(float), typeof(System.Action)))
			{
				DelayCallMgr obj = (DelayCallMgr)ToLua.ToObject(L, 1);
				string arg0 = ToLua.ToString(L, 2);
				float arg1 = (float)LuaDLL.lua_tonumber(L, 3);
				System.Action arg2 = null;
				LuaTypes funcType4 = LuaDLL.lua_type(L, 4);

				if (funcType4 != LuaTypes.LUA_TFUNCTION)
				{
					 arg2 = (System.Action)ToLua.ToObject(L, 4);
				}
				else
				{
					LuaFunction func = ToLua.ToLuaFunction(L, 4);
					arg2 = DelegateFactory.CreateDelegate(typeof(System.Action), func) as System.Action;
				}

				obj.Call(arg0, arg1, arg2);
				return 0;
			}
			else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(DelayCallMgr), typeof(string), typeof(float), typeof(LuaInterface.LuaFunction)))
			{
				DelayCallMgr obj = (DelayCallMgr)ToLua.ToObject(L, 1);
				string arg0 = ToLua.ToString(L, 2);
				float arg1 = (float)LuaDLL.lua_tonumber(L, 3);
				LuaFunction arg2 = ToLua.ToLuaFunction(L, 4);
				obj.Call(arg0, arg1, arg2);
				return 0;
			}
			else
			{
				return LuaDLL.luaL_throw(L, "invalid arguments to method: DelayCallMgr.Call");
			}
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int Cancel(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 2);
			DelayCallMgr obj = (DelayCallMgr)ToLua.CheckObject(L, 1, typeof(DelayCallMgr));
			string arg0 = ToLua.CheckString(L, 2);
			obj.Cancel(arg0);
			return 0;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int Clear(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 1);
			DelayCallMgr obj = (DelayCallMgr)ToLua.CheckObject(L, 1, typeof(DelayCallMgr));
			obj.Clear();
			return 0;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int op_Equality(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 2);
			UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
			UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
			bool o = arg0 == arg1;
			LuaDLL.lua_pushboolean(L, o);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int get_instance(IntPtr L)
	{
		try
		{
			ToLua.Push(L, DelayCallMgr.instance);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}
}

