1 // <auto-generated> 2 // automatically generated by the FlatBuffers compiler, do not modify 3 // </auto-generated> 4 5 namespace MyGame.Example 6 { 7 8 using global::System; 9 using global::FlatBuffers; 10 11 internal partial struct TestSimpleTableWithEnum : IFlatbufferObject 12 { 13 private Table __p; 14 public ByteBuffer ByteBuffer { get { return __p.bb; } } GetRootAsTestSimpleTableWithEnumMyGame.Example.TestSimpleTableWithEnum15 public static TestSimpleTableWithEnum GetRootAsTestSimpleTableWithEnum(ByteBuffer _bb) { return GetRootAsTestSimpleTableWithEnum(_bb, new TestSimpleTableWithEnum()); } GetRootAsTestSimpleTableWithEnumMyGame.Example.TestSimpleTableWithEnum16 public static TestSimpleTableWithEnum GetRootAsTestSimpleTableWithEnum(ByteBuffer _bb, TestSimpleTableWithEnum obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } __initMyGame.Example.TestSimpleTableWithEnum17 public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } __assignMyGame.Example.TestSimpleTableWithEnum18 public TestSimpleTableWithEnum __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 19 20 public Color Color { get { int o = __p.__offset(4); return o != 0 ? (Color)__p.bb.GetSbyte(o + __p.bb_pos) : Color.Green; } } MutateColorMyGame.Example.TestSimpleTableWithEnum21 public bool MutateColor(Color color) { int o = __p.__offset(4); if (o != 0) { __p.bb.PutSbyte(o + __p.bb_pos, (sbyte)color); return true; } else { return false; } } 22 CreateTestSimpleTableWithEnumMyGame.Example.TestSimpleTableWithEnum23 public static Offset<TestSimpleTableWithEnum> CreateTestSimpleTableWithEnum(FlatBufferBuilder builder, 24 Color color = Color.Green) { 25 builder.StartObject(1); 26 TestSimpleTableWithEnum.AddColor(builder, color); 27 return TestSimpleTableWithEnum.EndTestSimpleTableWithEnum(builder); 28 } 29 StartTestSimpleTableWithEnumMyGame.Example.TestSimpleTableWithEnum30 public static void StartTestSimpleTableWithEnum(FlatBufferBuilder builder) { builder.StartObject(1); } AddColorMyGame.Example.TestSimpleTableWithEnum31 public static void AddColor(FlatBufferBuilder builder, Color color) { builder.AddSbyte(0, (sbyte)color, 2); } EndTestSimpleTableWithEnumMyGame.Example.TestSimpleTableWithEnum32 public static Offset<TestSimpleTableWithEnum> EndTestSimpleTableWithEnum(FlatBufferBuilder builder) { 33 int o = builder.EndObject(); 34 return new Offset<TestSimpleTableWithEnum>(o); 35 } 36 }; 37 38 39 } 40