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

public class AnimationEventTriggerWrap
{
	public static void Register(LuaState L)
	{
		L.BeginClass(typeof(AnimationEventTrigger), typeof(UnityEngine.MonoBehaviour));
		L.RegFunction("AniMsgStr", AniMsgStr);
		L.RegFunction("__eq", op_Equality);
		L.RegFunction("__tostring", ToLua.op_ToString);
		L.RegVar("aniEvent", get_aniEvent, set_aniEvent);
		L.EndClass();
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int AniMsgStr(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 2);
			AnimationEventTrigger obj = (AnimationEventTrigger)ToLua.CheckObject(L, 1, typeof(AnimationEventTrigger));
			string arg0 = ToLua.CheckString(L, 2);
			obj.AniMsgStr(arg0);
			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_aniEvent(IntPtr L)
	{
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			AnimationEventTrigger obj = (AnimationEventTrigger)o;
			System.Action<string> ret = obj.aniEvent;
			ToLua.Push(L, ret);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index aniEvent on a nil value" : e.Message);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int set_aniEvent(IntPtr L)
	{
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			AnimationEventTrigger obj = (AnimationEventTrigger)o;
			System.Action<string> arg0 = null;
			LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

			if (funcType2 != LuaTypes.LUA_TFUNCTION)
			{
				 arg0 = (System.Action<string>)ToLua.CheckObject(L, 2, typeof(System.Action<string>));
			}
			else
			{
				LuaFunction func = ToLua.ToLuaFunction(L, 2);
				arg0 = DelegateFactory.CreateDelegate(typeof(System.Action<string>), func) as System.Action<string>;
			}

			obj.aniEvent = arg0;
			return 0;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index aniEvent on a nil value" : e.Message);
		}
	}
}

