当前位置: 首页>>代码示例>>C#>>正文


C# FlatBufferBuilder.EndVector方法代码示例

本文整理汇总了C#中FlatBuffers.FlatBufferBuilder.EndVector方法的典型用法代码示例。如果您正苦于以下问题:C# FlatBufferBuilder.EndVector方法的具体用法?C# FlatBufferBuilder.EndVector怎么用?C# FlatBufferBuilder.EndVector使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FlatBuffers.FlatBufferBuilder的用法示例。


在下文中一共展示了FlatBufferBuilder.EndVector方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateTechnologiesVector

 public static VectorOffset CreateTechnologiesVector(FlatBufferBuilder builder, StringOffset[] data)
 {
     builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector();
 }
开发者ID:Reimerei,项目名称:port_experiments,代码行数:4,代码来源:GameData.cs

示例2: CreateUnitLevelsVector

 public static VectorOffset CreateUnitLevelsVector(FlatBufferBuilder builder, Offset<TypeLevel>[] data)
 {
     builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector();
 }
开发者ID:Reimerei,项目名称:port_experiments,代码行数:4,代码来源:GameData.cs

示例3: CreatePlayerResourcesVector

 public static VectorOffset CreatePlayerResourcesVector(FlatBufferBuilder builder, Offset<TypeAmount>[] data)
 {
     builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector();
 }
开发者ID:Reimerei,项目名称:port_experiments,代码行数:4,代码来源:GameData.cs

示例4: CreateSectorsVector

 public static VectorOffset CreateSectorsVector(FlatBufferBuilder builder, bool[] data)
 {
     builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddBool(data[i]); return builder.EndVector();
 }
开发者ID:Reimerei,项目名称:port_experiments,代码行数:4,代码来源:GameData.cs

示例5: CreateItemsVector

 public static VectorOffset CreateItemsVector(FlatBufferBuilder builder, Offset<uvSwapItemData>[] data)
 {
     builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector();
 }
开发者ID:kestrelm,项目名称:CreatureTools,代码行数:4,代码来源:uvSwapItemMesh.cs

示例6: CreateCurrentQuestsVector

 public static VectorOffset CreateCurrentQuestsVector(FlatBufferBuilder builder, Offset<CurrentQuest>[] data)
 {
     builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector();
 }
开发者ID:Reimerei,项目名称:port_experiments,代码行数:4,代码来源:GameData.cs

示例7: CreateStartPtVector

 public static VectorOffset CreateStartPtVector(FlatBufferBuilder builder, float[] data)
 {
     builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddFloat(data[i]); return builder.EndVector();
 }
开发者ID:kestrelm,项目名称:CreatureTools,代码行数:4,代码来源:animationBone.cs

示例8: CreateMeshesVector

 public static VectorOffset CreateMeshesVector(FlatBufferBuilder builder, Offset<animationMesh>[] data)
 {
     builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector();
 }
开发者ID:kestrelm,项目名称:CreatureTools,代码行数:4,代码来源:animationMeshTimeSample.cs

示例9: TypeLevelVector

    VectorOffset TypeLevelVector(FlatBufferBuilder fbb, System.Collections.Generic.Dictionary<string, int> items)
    {
        var quantities = metaPool.unitLevels.values;
        int count = quantities.Count;

        Offset<TypeLevel>[] resources = new Offset<TypeLevel>[count];

        int index = 0;
        foreach (var type in quantities.Keys) {
            StringOffset typeStringOffset = fbb.CreateString(type);
            resources[index] = TypeLevel.CreateTypeLevel(fbb,typeStringOffset, (sbyte)quantities[type]);
            index++;
        }
        fbb.StartVector(4, resources.Length, 4);
        for (int i = resources.Length - 1; i >= 0; i--) fbb.AddOffset(resources[i].Value);
        return fbb.EndVector();
    }
开发者ID:Reimerei,项目名称:port_experiments,代码行数:17,代码来源:FBSerialisationService.cs

示例10: TypeAmountVector

    VectorOffset TypeAmountVector(FlatBufferBuilder fbb, System.Collections.Generic.Dictionary<string, int> items)
    {
        if(items == null || items.Count == 0){
            return default(VectorOffset);
        }
        int count = items.Count;

        Offset<TypeAmount>[] resources = new Offset<TypeAmount>[count];
        int index = 0;
        foreach (var type in items.Keys) {
            StringOffset typeStringOffset = fbb.CreateString(type);
            resources[index] = TypeAmount.CreateTypeAmount(fbb,typeStringOffset, items[type]);
            index++;
        }

        fbb.StartVector(4, resources.Length, 4);
        for (int i = resources.Length - 1; i >= 0; i--) fbb.AddOffset(resources[i].Value);
        return fbb.EndVector();
    }
开发者ID:Reimerei,项目名称:port_experiments,代码行数:19,代码来源:FBSerialisationService.cs

示例11: CreateTestnestedflatbufferVector

 public static int CreateTestnestedflatbufferVector(FlatBufferBuilder builder, byte[] data)
 {
     builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddByte(data[i]); return builder.EndVector();
 }
开发者ID:holvonix,项目名称:flatbuffers,代码行数:4,代码来源:Monster.cs

示例12: CreateTestarrayoftablesVector

 public static int CreateTestarrayoftablesVector(FlatBufferBuilder builder, int[] data)
 {
     builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i]); return builder.EndVector();
 }
开发者ID:holvonix,项目名称:flatbuffers,代码行数:4,代码来源:Monster.cs

示例13: CreateWeightsVector

 public static VectorOffset CreateWeightsVector(FlatBufferBuilder builder, Offset<meshRegionBone>[] data)
 {
     builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector();
 }
开发者ID:kestrelm,项目名称:CreatureTools,代码行数:4,代码来源:meshRegion.cs


注:本文中的FlatBuffers.FlatBufferBuilder.EndVector方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。