Пример #1
0
    static int GetComponents(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 2)
        {
            FSMBase     obj  = LuaScriptMgr.GetNetObject <FSMBase>(L, 1);
            Type        arg0 = LuaScriptMgr.GetTypeObject(L, 2);
            Component[] o    = obj.GetComponents(arg0);
            LuaScriptMgr.PushArray(L, o);
            return(1);
        }
        else if (count == 3)
        {
            FSMBase          obj  = LuaScriptMgr.GetNetObject <FSMBase>(L, 1);
            Type             arg0 = LuaScriptMgr.GetTypeObject(L, 2);
            List <Component> arg1 = LuaScriptMgr.GetNetObject <List <Component> >(L, 3);
            obj.GetComponents(arg0, arg1);
            return(0);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: FSMBase.GetComponents");
        }

        return(0);
    }