blob: f50a2c85afdf89397b4cd27762414c7f9620540e [file] [log] [blame]
James Kuszmaul8e62b022022-03-22 09:33:25 -07001// 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() {
Austin Schuh2dd86a92022-09-14 21:19:23 -070021 return 'MyGame_Example2_Monster';
James Kuszmaul8e62b022022-03-22 09:33:25 -070022 }
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}