本文整理汇总了C#中FlatBuffers.FlatBufferBuilder.PutShort方法的典型用法代码示例。如果您正苦于以下问题:C# FlatBufferBuilder.PutShort方法的具体用法?C# FlatBufferBuilder.PutShort怎么用?C# FlatBufferBuilder.PutShort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FlatBuffers.FlatBufferBuilder
的用法示例。
在下文中一共展示了FlatBufferBuilder.PutShort方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateTest
public static int CreateTest(FlatBufferBuilder builder, short A, sbyte B) {
builder.Prep(2, 4);
builder.Pad(1);
builder.PutSbyte(B);
builder.PutShort(A);
return builder.Offset();
}
示例2: CreateTest
public static Offset<Test> CreateTest(FlatBufferBuilder builder, short A, sbyte B) {
builder.Prep(2, 4);
builder.Pad(1);
builder.PutSbyte(B);
builder.PutShort(A);
return new Offset<Test>(builder.Offset);
}
示例3: CreateVec3
public static int CreateVec3(FlatBufferBuilder builder, float X, float Y, float Z, double Test1, Color Test2, short Test_A, sbyte Test_B) {
builder.Prep(16, 32);
builder.Pad(2);
builder.Prep(2, 4);
builder.Pad(1);
builder.PutSbyte(Test_B);
builder.PutShort(Test_A);
builder.Pad(1);
builder.PutSbyte((sbyte)(Test2));
builder.PutDouble(Test1);
builder.Pad(4);
builder.PutFloat(Z);
builder.PutFloat(Y);
builder.PutFloat(X);
return builder.Offset();
}
示例4: CreateVec3
public static Offset<Vec3> CreateVec3(FlatBufferBuilder builder, float X, float Y, float Z, double Test1, Color Test2, short test3_A, sbyte test3_B) {
builder.Prep(16, 32);
builder.Pad(2);
builder.Prep(2, 4);
builder.Pad(1);
builder.PutSbyte(test3_B);
builder.PutShort(test3_A);
builder.Pad(1);
builder.PutSbyte((sbyte)(Test2));
builder.PutDouble(Test1);
builder.Pad(4);
builder.PutFloat(Z);
builder.PutFloat(Y);
builder.PutFloat(X);
return new Offset<Vec3>(builder.Offset);
}