UnityEngine_Events_UnityEventBaseWrap.cs 4.8 KB
Newer Older
L
linxinfa 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
//this source code was auto-generated by tolua#, do not modify it
using System;
using LuaInterface;

public class UnityEngine_Events_UnityEventBaseWrap
{
	public static void Register(LuaState L)
	{
		L.BeginClass(typeof(UnityEngine.Events.UnityEventBase), typeof(System.Object));
		L.RegFunction("GetPersistentEventCount", GetPersistentEventCount);
		L.RegFunction("GetPersistentTarget", GetPersistentTarget);
		L.RegFunction("GetPersistentMethodName", GetPersistentMethodName);
		L.RegFunction("SetPersistentListenerState", SetPersistentListenerState);
		L.RegFunction("RemoveAllListeners", RemoveAllListeners);
		L.RegFunction("ToString", ToString);
		L.RegFunction("GetValidMethodInfo", GetValidMethodInfo);
		L.RegFunction("__tostring", ToLua.op_ToString);
		L.EndClass();
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int GetPersistentEventCount(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 1);
			UnityEngine.Events.UnityEventBase obj = (UnityEngine.Events.UnityEventBase)ToLua.CheckObject(L, 1, typeof(UnityEngine.Events.UnityEventBase));
			int o = obj.GetPersistentEventCount();
			LuaDLL.lua_pushinteger(L, o);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int GetPersistentTarget(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 2);
			UnityEngine.Events.UnityEventBase obj = (UnityEngine.Events.UnityEventBase)ToLua.CheckObject(L, 1, typeof(UnityEngine.Events.UnityEventBase));
			int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
			UnityEngine.Object o = obj.GetPersistentTarget(arg0);
			ToLua.Push(L, o);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int GetPersistentMethodName(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 2);
			UnityEngine.Events.UnityEventBase obj = (UnityEngine.Events.UnityEventBase)ToLua.CheckObject(L, 1, typeof(UnityEngine.Events.UnityEventBase));
			int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
			string o = obj.GetPersistentMethodName(arg0);
			LuaDLL.lua_pushstring(L, o);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int SetPersistentListenerState(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 3);
			UnityEngine.Events.UnityEventBase obj = (UnityEngine.Events.UnityEventBase)ToLua.CheckObject(L, 1, typeof(UnityEngine.Events.UnityEventBase));
			int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
			UnityEngine.Events.UnityEventCallState arg1 = (UnityEngine.Events.UnityEventCallState)ToLua.CheckObject(L, 3, typeof(UnityEngine.Events.UnityEventCallState));
			obj.SetPersistentListenerState(arg0, arg1);
			return 0;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

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

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int ToString(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 1);
			UnityEngine.Events.UnityEventBase obj = (UnityEngine.Events.UnityEventBase)ToLua.CheckObject(L, 1, typeof(UnityEngine.Events.UnityEventBase));
			string o = obj.ToString();
			LuaDLL.lua_pushstring(L, o);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

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

			if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(System.Type), typeof(string), typeof(System.Type[])))
			{
				System.Type arg0 = (System.Type)ToLua.ToObject(L, 1);
				string arg1 = ToLua.ToString(L, 2);
				System.Type[] arg2 = ToLua.CheckObjectArray<System.Type>(L, 3);
				System.Reflection.MethodInfo o = UnityEngine.Events.UnityEventBase.GetValidMethodInfo(arg0, arg1, arg2);
				ToLua.PushObject(L, o);
				return 1;
			}
			else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(object), typeof(string), typeof(System.Type[])))
			{
				object arg0 = ToLua.ToVarObject(L, 1);
				string arg1 = ToLua.ToString(L, 2);
				System.Type[] arg2 = ToLua.CheckObjectArray<System.Type>(L, 3);
				System.Reflection.MethodInfo o = UnityEngine.Events.UnityEventBase.GetValidMethodInfo(arg0, arg1, arg2);
				ToLua.PushObject(L, o);
				return 1;
			}
			else
			{
				return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Events.UnityEventBase.GetValidMethodInfo");
			}
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}
}