• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// automatically generated by the FlatBuffers compiler, do not modify
2export class Ability {
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    id() {
13        return this.bb.readUint32(this.bb_pos);
14    }
15    mutate_id(value) {
16        this.bb.writeUint32(this.bb_pos + 0, value);
17        return true;
18    }
19    distance() {
20        return this.bb.readUint32(this.bb_pos + 4);
21    }
22    mutate_distance(value) {
23        this.bb.writeUint32(this.bb_pos + 4, value);
24        return true;
25    }
26    static getFullyQualifiedName() {
27        return 'MyGame.Example.Ability';
28    }
29    static sizeOf() {
30        return 8;
31    }
32    static createAbility(builder, id, distance) {
33        builder.prep(4, 8);
34        builder.writeInt32(distance);
35        builder.writeInt32(id);
36        return builder.offset();
37    }
38    unpack() {
39        return new AbilityT(this.id(), this.distance());
40    }
41    unpackTo(_o) {
42        _o.id = this.id();
43        _o.distance = this.distance();
44    }
45}
46export class AbilityT {
47    constructor(id = 0, distance = 0) {
48        this.id = id;
49        this.distance = distance;
50    }
51    pack(builder) {
52        return Ability.createAbility(builder, this.id, this.distance);
53    }
54}
55