1// automatically generated by the FlatBuffers compiler, do not modify 2import * as flatbuffers from 'flatbuffers'; 3export class Monster { 4 constructor() { 5 this.bb = null; 6 this.bb_pos = 0; 7 } 8 __init(i, bb) { 9 this.bb_pos = i; 10 this.bb = bb; 11 return this; 12 } 13 static getRootAsMonster(bb, obj) { 14 return (obj || new Monster()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 15 } 16 static getSizePrefixedRootAsMonster(bb, obj) { 17 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 18 return (obj || new Monster()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 19 } 20 static getFullyQualifiedName() { 21 return 'MyGame.Example2.Monster'; 22 } 23 static startMonster(builder) { 24 builder.startObject(0); 25 } 26 static endMonster(builder) { 27 const offset = builder.endObject(); 28 return offset; 29 } 30 static createMonster(builder) { 31 Monster.startMonster(builder); 32 return Monster.endMonster(builder); 33 } 34 serialize() { 35 return this.bb.bytes(); 36 } 37 static deserialize(buffer) { 38 return Monster.getRootAsMonster(new flatbuffers.ByteBuffer(buffer)); 39 } 40 unpack() { 41 return new MonsterT(); 42 } 43 unpackTo(_o) { } 44} 45export class MonsterT { 46 constructor() { } 47 pack(builder) { 48 return Monster.createMonster(builder); 49 } 50} 51