Home | History | Annotate | Download | only in Example
      1 // automatically generated by the FlatBuffers compiler, do not modify
      2 
      3 package MyGame.Example;
      4 
      5 import java.nio.*;
      6 import java.lang.*;
      7 import java.util.*;
      8 import com.google.flatbuffers.*;
      9 
     10 @SuppressWarnings("unused")
     11 public final class Ability extends Struct {
     12   public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
     13   public Ability __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
     14 
     15   public long id() { return (long)bb.getInt(bb_pos + 0) & 0xFFFFFFFFL; }
     16   public void mutateId(long id) { bb.putInt(bb_pos + 0, (int)id); }
     17   public long distance() { return (long)bb.getInt(bb_pos + 4) & 0xFFFFFFFFL; }
     18   public void mutateDistance(long distance) { bb.putInt(bb_pos + 4, (int)distance); }
     19 
     20   public static int createAbility(FlatBufferBuilder builder, long id, long distance) {
     21     builder.prep(4, 8);
     22     builder.putInt((int)distance);
     23     builder.putInt((int)id);
     24     return builder.offset();
     25   }
     26 }
     27 
     28