Esempio n. 1
0
    static int AddScrollRectHandler(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 2);
            UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckUnityObject(L, 1, typeof(UnityEngine.GameObject));
            System.Action <UnityEngine.GameObject, UnityEngine.Vector2> arg1 = null;
            LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

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

            LuaHelper.AddScrollRectHandler(arg0, arg1);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }