2014-09-25 22:53:56 +00:00
|
|
|
// automatically generated, do not modify
|
|
|
|
|
|
|
|
namespace MyGame.Example
|
|
|
|
{
|
|
|
|
|
2015-10-05 02:57:39 +00:00
|
|
|
using System;
|
2014-09-25 22:53:56 +00:00
|
|
|
using FlatBuffers;
|
|
|
|
|
2015-04-06 23:42:08 +00:00
|
|
|
public sealed class Stat : Table {
|
2015-01-30 22:09:59 +00:00
|
|
|
public static Stat GetRootAsStat(ByteBuffer _bb) { return GetRootAsStat(_bb, new Stat()); }
|
2015-05-06 14:33:50 +00:00
|
|
|
public static Stat GetRootAsStat(ByteBuffer _bb, Stat obj) { return (obj.__init(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
2014-09-25 22:53:56 +00:00
|
|
|
public Stat __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }
|
|
|
|
|
2015-05-06 14:33:50 +00:00
|
|
|
public string Id { get { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } }
|
2015-10-05 02:57:39 +00:00
|
|
|
public ArraySegment<byte>? GetIdBytes() { return __vector_as_arraysegment(4); }
|
2015-05-06 14:33:50 +00:00
|
|
|
public long Val { get { int o = __offset(6); return o != 0 ? bb.GetLong(o + bb_pos) : (long)0; } }
|
2015-08-01 16:07:10 +00:00
|
|
|
public bool MutateVal(long val) { int o = __offset(6); if (o != 0) { bb.PutLong(o + bb_pos, val); return true; } else { return false; } }
|
2015-05-06 14:33:50 +00:00
|
|
|
public ushort Count { get { int o = __offset(8); return o != 0 ? bb.GetUshort(o + bb_pos) : (ushort)0; } }
|
2015-08-01 16:07:10 +00:00
|
|
|
public bool MutateCount(ushort count) { int o = __offset(8); if (o != 0) { bb.PutUshort(o + bb_pos, count); return true; } else { return false; } }
|
2014-09-25 22:53:56 +00:00
|
|
|
|
2015-07-28 21:33:45 +00:00
|
|
|
public static Offset<Stat> CreateStat(FlatBufferBuilder builder,
|
2015-11-14 04:39:46 +00:00
|
|
|
StringOffset idOffset = default(StringOffset),
|
2015-03-19 00:52:39 +00:00
|
|
|
long val = 0,
|
|
|
|
ushort count = 0) {
|
|
|
|
builder.StartObject(3);
|
2014-09-25 22:53:56 +00:00
|
|
|
Stat.AddVal(builder, val);
|
2015-11-14 04:39:46 +00:00
|
|
|
Stat.AddId(builder, idOffset);
|
2015-03-19 00:52:39 +00:00
|
|
|
Stat.AddCount(builder, count);
|
2014-09-25 22:53:56 +00:00
|
|
|
return Stat.EndStat(builder);
|
|
|
|
}
|
|
|
|
|
2015-03-19 00:52:39 +00:00
|
|
|
public static void StartStat(FlatBufferBuilder builder) { builder.StartObject(3); }
|
2015-07-28 21:33:45 +00:00
|
|
|
public static void AddId(FlatBufferBuilder builder, StringOffset idOffset) { builder.AddOffset(0, idOffset.Value, 0); }
|
2014-09-25 22:53:56 +00:00
|
|
|
public static void AddVal(FlatBufferBuilder builder, long val) { builder.AddLong(1, val, 0); }
|
2015-03-19 00:52:39 +00:00
|
|
|
public static void AddCount(FlatBufferBuilder builder, ushort count) { builder.AddUshort(2, count, 0); }
|
2015-07-28 21:33:45 +00:00
|
|
|
public static Offset<Stat> EndStat(FlatBufferBuilder builder) {
|
2014-09-25 22:53:56 +00:00
|
|
|
int o = builder.EndObject();
|
2015-07-28 21:33:45 +00:00
|
|
|
return new Offset<Stat>(o);
|
2014-09-25 22:53:56 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|