1 // automatically generated by the FlatBuffers compiler, do not modify 2 3 import java.nio.*; 4 import java.lang.*; 5 import java.util.*; 6 import com.google.flatbuffers.*; 7 8 @SuppressWarnings("unused") 9 public final class Attacker extends Table { getRootAsAttacker(ByteBuffer _bb)10 public static Attacker getRootAsAttacker(ByteBuffer _bb) { return getRootAsAttacker(_bb, new Attacker()); } getRootAsAttacker(ByteBuffer _bb, Attacker obj)11 public static Attacker getRootAsAttacker(ByteBuffer _bb, Attacker obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } __init(int _i, ByteBuffer _bb)12 public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } __assign(int _i, ByteBuffer _bb)13 public Attacker __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 14 swordAttackDamage()15 public int swordAttackDamage() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; } mutateSwordAttackDamage(int sword_attack_damage)16 public boolean mutateSwordAttackDamage(int sword_attack_damage) { int o = __offset(4); if (o != 0) { bb.putInt(o + bb_pos, sword_attack_damage); return true; } else { return false; } } 17 createAttacker(FlatBufferBuilder builder, int sword_attack_damage)18 public static int createAttacker(FlatBufferBuilder builder, 19 int sword_attack_damage) { 20 builder.startObject(1); 21 Attacker.addSwordAttackDamage(builder, sword_attack_damage); 22 return Attacker.endAttacker(builder); 23 } 24 startAttacker(FlatBufferBuilder builder)25 public static void startAttacker(FlatBufferBuilder builder) { builder.startObject(1); } addSwordAttackDamage(FlatBufferBuilder builder, int swordAttackDamage)26 public static void addSwordAttackDamage(FlatBufferBuilder builder, int swordAttackDamage) { builder.addInt(0, swordAttackDamage, 0); } endAttacker(FlatBufferBuilder builder)27 public static int endAttacker(FlatBufferBuilder builder) { 28 int o = builder.endObject(); 29 return o; 30 } 31 } 32 33