Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 1 | // <auto-generated> |
| 2 | // automatically generated by the FlatBuffers compiler, do not modify |
| 3 | // </auto-generated> |
| 4 | |
| 5 | using global::System; |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 6 | using global::System.Collections.Generic; |
Austin Schuh | 2dd86a9 | 2022-09-14 21:19:23 -0700 | [diff] [blame] | 7 | using global::Google.FlatBuffers; |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 8 | |
| 9 | public struct Attacker : IFlatbufferObject |
| 10 | { |
| 11 | private Table __p; |
| 12 | public ByteBuffer ByteBuffer { get { return __p.bb; } } |
James Kuszmaul | 3b15b0c | 2022-11-08 14:03:16 -0800 | [diff] [blame^] | 13 | public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 14 | public static Attacker GetRootAsAttacker(ByteBuffer _bb) { return GetRootAsAttacker(_bb, new Attacker()); } |
| 15 | public static Attacker GetRootAsAttacker(ByteBuffer _bb, Attacker obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } |
| 16 | public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } |
| 17 | public Attacker __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } |
| 18 | |
| 19 | public int SwordAttackDamage { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } |
| 20 | 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; } } |
| 21 | |
| 22 | public static Offset<Attacker> CreateAttacker(FlatBufferBuilder builder, |
| 23 | int sword_attack_damage = 0) { |
| 24 | builder.StartTable(1); |
| 25 | Attacker.AddSwordAttackDamage(builder, sword_attack_damage); |
| 26 | return Attacker.EndAttacker(builder); |
| 27 | } |
| 28 | |
| 29 | public static void StartAttacker(FlatBufferBuilder builder) { builder.StartTable(1); } |
| 30 | public static void AddSwordAttackDamage(FlatBufferBuilder builder, int swordAttackDamage) { builder.AddInt(0, swordAttackDamage, 0); } |
| 31 | public static Offset<Attacker> EndAttacker(FlatBufferBuilder builder) { |
| 32 | int o = builder.EndTable(); |
| 33 | return new Offset<Attacker>(o); |
| 34 | } |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 35 | public AttackerT UnPack() { |
| 36 | var _o = new AttackerT(); |
| 37 | this.UnPackTo(_o); |
| 38 | return _o; |
| 39 | } |
| 40 | public void UnPackTo(AttackerT _o) { |
| 41 | _o.SwordAttackDamage = this.SwordAttackDamage; |
| 42 | } |
| 43 | public static Offset<Attacker> Pack(FlatBufferBuilder builder, AttackerT _o) { |
| 44 | if (_o == null) return default(Offset<Attacker>); |
| 45 | return CreateAttacker( |
| 46 | builder, |
| 47 | _o.SwordAttackDamage); |
| 48 | } |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 49 | } |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 50 | |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 51 | public class AttackerT |
| 52 | { |
| 53 | [Newtonsoft.Json.JsonProperty("sword_attack_damage")] |
| 54 | public int SwordAttackDamage { get; set; } |
| 55 | |
| 56 | public AttackerT() { |
| 57 | this.SwordAttackDamage = 0; |
| 58 | } |
| 59 | } |
| 60 | |