2014-09-09 18:46:13 +00:00
|
|
|
// automatically generated, do not modify
|
|
|
|
|
|
|
|
namespace MyGame.Example
|
|
|
|
{
|
|
|
|
|
|
|
|
using FlatBuffers;
|
|
|
|
|
2015-04-06 23:42:08 +00:00
|
|
|
public sealed class Vec3 : Struct {
|
2014-09-09 18:46:13 +00:00
|
|
|
public Vec3 __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }
|
|
|
|
|
2015-05-06 14:33:50 +00:00
|
|
|
public float X { get { return bb.GetFloat(bb_pos + 0); } }
|
|
|
|
public float Y { get { return bb.GetFloat(bb_pos + 4); } }
|
|
|
|
public float Z { get { return bb.GetFloat(bb_pos + 8); } }
|
|
|
|
public double Test1 { get { return bb.GetDouble(bb_pos + 16); } }
|
|
|
|
public Color Test2 { get { return (Color)bb.GetSbyte(bb_pos + 24); } }
|
|
|
|
public Test Test3 { get { return GetTest3(new Test()); } }
|
|
|
|
public Test GetTest3(Test obj) { return obj.__init(bb_pos + 26, bb); }
|
2014-09-09 18:46:13 +00:00
|
|
|
|
2015-07-13 17:00:48 +00:00
|
|
|
public static int CreateVec3(FlatBufferBuilder builder, float X, float Y, float Z, double Test1, Color Test2, short test3_A, sbyte test3_B) {
|
2014-09-09 18:46:13 +00:00
|
|
|
builder.Prep(16, 32);
|
|
|
|
builder.Pad(2);
|
|
|
|
builder.Prep(2, 4);
|
|
|
|
builder.Pad(1);
|
2015-07-13 17:00:48 +00:00
|
|
|
builder.PutSbyte(test3_B);
|
|
|
|
builder.PutShort(test3_A);
|
2014-09-09 18:46:13 +00:00
|
|
|
builder.Pad(1);
|
2015-04-13 11:25:03 +00:00
|
|
|
builder.PutSbyte((sbyte)(Test2));
|
2014-09-09 18:46:13 +00:00
|
|
|
builder.PutDouble(Test1);
|
|
|
|
builder.Pad(4);
|
|
|
|
builder.PutFloat(Z);
|
|
|
|
builder.PutFloat(Y);
|
|
|
|
builder.PutFloat(X);
|
2015-05-06 14:33:50 +00:00
|
|
|
return builder.Offset;
|
2014-09-09 18:46:13 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|