• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // <auto-generated>
2 //  automatically generated by the FlatBuffers compiler, do not modify
3 // </auto-generated>
4 
5 using global::System;
6 using global::System.Collections.Generic;
7 using global::FlatBuffers;
8 
9 public struct Attacker : IFlatbufferObject
10 {
11   private Table __p;
12   public ByteBuffer ByteBuffer { get { return __p.bb; } }
ValidateVersionAttacker13   public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_1_12_0(); }
GetRootAsAttackerAttacker14   public static Attacker GetRootAsAttacker(ByteBuffer _bb) { return GetRootAsAttacker(_bb, new Attacker()); }
GetRootAsAttackerAttacker15   public static Attacker GetRootAsAttacker(ByteBuffer _bb, Attacker obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
__initAttacker16   public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
__assignAttacker17   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; } }
MutateSwordAttackDamageAttacker20   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 
CreateAttackerAttacker22   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 
StartAttackerAttacker29   public static void StartAttacker(FlatBufferBuilder builder) { builder.StartTable(1); }
AddSwordAttackDamageAttacker30   public static void AddSwordAttackDamage(FlatBufferBuilder builder, int swordAttackDamage) { builder.AddInt(0, swordAttackDamage, 0); }
EndAttackerAttacker31   public static Offset<Attacker> EndAttacker(FlatBufferBuilder builder) {
32     int o = builder.EndTable();
33     return new Offset<Attacker>(o);
34   }
UnPackAttacker35   public AttackerT UnPack() {
36     var _o = new AttackerT();
37     this.UnPackTo(_o);
38     return _o;
39   }
UnPackToAttacker40   public void UnPackTo(AttackerT _o) {
41     _o.SwordAttackDamage = this.SwordAttackDamage;
42   }
PackAttacker43   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   }
49 };
50 
51 public class AttackerT
52 {
53   [Newtonsoft.Json.JsonProperty("sword_attack_damage")]
54   public int SwordAttackDamage { get; set; }
55 
AttackerT()56   public AttackerT() {
57     this.SwordAttackDamage = 0;
58   }
59 }
60 
61