blob: 0e3300a5cba8645bd987238607901381c8a6f58f [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001// <auto-generated>
2// automatically generated by the FlatBuffers compiler, do not modify
3// </auto-generated>
4
5using global::System;
6using global::FlatBuffers;
7
8public struct Attacker : IFlatbufferObject
9{
10 private Table __p;
11 public ByteBuffer ByteBuffer { get { return __p.bb; } }
12 public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_1_11_1(); }
13 public static Attacker GetRootAsAttacker(ByteBuffer _bb) { return GetRootAsAttacker(_bb, new Attacker()); }
14 public static Attacker GetRootAsAttacker(ByteBuffer _bb, Attacker obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
15 public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
16 public Attacker __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
17
18 public int SwordAttackDamage { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
19 public bool MutateSwordAttackDamage(int sword_attack_damage) { int o = __p.__offset(4); if (o != 0) { __p.bb.PutInt(o + __p.bb_pos, sword_attack_damage); return true; } else { return false; } }
20
21 public static Offset<Attacker> CreateAttacker(FlatBufferBuilder builder,
22 int sword_attack_damage = 0) {
23 builder.StartTable(1);
24 Attacker.AddSwordAttackDamage(builder, sword_attack_damage);
25 return Attacker.EndAttacker(builder);
26 }
27
28 public static void StartAttacker(FlatBufferBuilder builder) { builder.StartTable(1); }
29 public static void AddSwordAttackDamage(FlatBufferBuilder builder, int swordAttackDamage) { builder.AddInt(0, swordAttackDamage, 0); }
30 public static Offset<Attacker> EndAttacker(FlatBufferBuilder builder) {
31 int o = builder.EndTable();
32 return new Offset<Attacker>(o);
33 }
34};
35