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