2016-05-26 13:26:58 +00:00
|
|
|
// automatically generated by the FlatBuffers compiler, do not modify
|
2015-08-11 16:01:43 +00:00
|
|
|
|
|
|
|
namespace MyGame.Example
|
|
|
|
{
|
|
|
|
|
2015-10-05 02:57:39 +00:00
|
|
|
using System;
|
2015-08-11 16:01:43 +00:00
|
|
|
using FlatBuffers;
|
|
|
|
|
2016-08-13 01:01:38 +00:00
|
|
|
public partial struct TestSimpleTableWithEnum : IFlatbufferObject
|
|
|
|
{
|
|
|
|
private Table __p;
|
2015-08-11 16:01:43 +00:00
|
|
|
public static TestSimpleTableWithEnum GetRootAsTestSimpleTableWithEnum(ByteBuffer _bb) { return GetRootAsTestSimpleTableWithEnum(_bb, new TestSimpleTableWithEnum()); }
|
2016-08-13 01:01:38 +00:00
|
|
|
public static TestSimpleTableWithEnum GetRootAsTestSimpleTableWithEnum(ByteBuffer _bb, TestSimpleTableWithEnum obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
|
|
|
public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; }
|
|
|
|
public TestSimpleTableWithEnum __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
2015-08-11 16:01:43 +00:00
|
|
|
|
2016-08-13 01:01:38 +00:00
|
|
|
public Color Color { get { int o = __p.__offset(4); return o != 0 ? (Color)__p.bb.GetSbyte(o + __p.bb_pos) : Color.Green; } }
|
|
|
|
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; } }
|
2015-08-11 16:01:43 +00:00
|
|
|
|
|
|
|
public static Offset<TestSimpleTableWithEnum> CreateTestSimpleTableWithEnum(FlatBufferBuilder builder,
|
2015-11-05 22:47:39 +00:00
|
|
|
Color color = Color.Green) {
|
2015-08-11 16:01:43 +00:00
|
|
|
builder.StartObject(1);
|
|
|
|
TestSimpleTableWithEnum.AddColor(builder, color);
|
|
|
|
return TestSimpleTableWithEnum.EndTestSimpleTableWithEnum(builder);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void StartTestSimpleTableWithEnum(FlatBufferBuilder builder) { builder.StartObject(1); }
|
2015-11-14 04:39:46 +00:00
|
|
|
public static void AddColor(FlatBufferBuilder builder, Color color) { builder.AddSbyte(0, (sbyte)color, 2); }
|
2015-08-11 16:01:43 +00:00
|
|
|
public static Offset<TestSimpleTableWithEnum> EndTestSimpleTableWithEnum(FlatBufferBuilder builder) {
|
|
|
|
int o = builder.EndObject();
|
|
|
|
return new Offset<TestSimpleTableWithEnum>(o);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|