| 1 |
// automatically generated by the FlatBuffers compiler, do not modify |
| 2 |
export class Test { |
| 3 |
constructor() { |
| 4 |
this.bb = null; |
| 5 |
this.bb_pos = 0; |
| 6 |
} |
| 7 |
__init(i, bb) { |
| 8 |
this.bb_pos = i; |
| 9 |
this.bb = bb; |
| 10 |
return this; |
| 11 |
} |
| 12 |
a() { |
| 13 |
return this.bb.readInt16(this.bb_pos); |
| 14 |
} |
| 15 |
mutate_a(value) { |
| 16 |
this.bb.writeInt16(this.bb_pos + 0, value); |
| 17 |
return true; |
| 18 |
} |
| 19 |
b() { |
| 20 |
return this.bb.readInt8(this.bb_pos + 2); |
| 21 |
} |
| 22 |
mutate_b(value) { |
| 23 |
this.bb.writeInt8(this.bb_pos + 2, value); |
| 24 |
return true; |
| 25 |
} |
| 26 |
static getFullyQualifiedName() { |
| 27 |
return 'MyGame.Example.Test'; |
| 28 |
} |
| 29 |
static sizeOf() { |
| 30 |
return 4; |
| 31 |
} |
| 32 |
static createTest(builder, a, b) { |
| 33 |
builder.prep(2, 4); |
| 34 |
builder.pad(1); |
| 35 |
builder.writeInt8(b); |
| 36 |
builder.writeInt16(a); |
| 37 |
return builder.offset(); |
| 38 |
} |
| 39 |
unpack() { |
| 40 |
return new TestT(this.a(), this.b()); |
| 41 |
} |
| 42 |
unpackTo(_o) { |
| 43 |
_o.a = this.a(); |
| 44 |
_o.b = this.b(); |
| 45 |
} |
| 46 |
} |
| 47 |
export class TestT { |
| 48 |
constructor(a = 0, b = 0) { |
| 49 |
this.a = a; |
| 50 |
this.b = b; |
| 51 |
} |
| 52 |
pack(builder) { |
| 53 |
return Test.createTest(builder, this.a, this.b); |
| 54 |
} |
| 55 |
} |