1-- automatically generated by the FlatBuffers compiler, do not modify
2
3-- namespace: Example
4
5local flatbuffers = require('flatbuffers')
6
7local Ability = {} -- the module
8local Ability_mt = {} -- the class metatable
9
10function Ability.New()
11    local o = {}
12    setmetatable(o, {__index = Ability_mt})
13    return o
14end
15function Ability_mt:Init(buf, pos)
16    self.view = flatbuffers.view.New(buf, pos)
17end
18function Ability_mt:Id()
19    return self.view:Get(flatbuffers.N.Uint32, self.view.pos + 0)
20end
21function Ability_mt:Distance()
22    return self.view:Get(flatbuffers.N.Uint32, self.view.pos + 4)
23end
24function Ability.CreateAbility(builder, id, distance)
25    builder:Prep(4, 8)
26    builder:PrependUint32(distance)
27    builder:PrependUint32(id)
28    return builder:Offset()
29end
30
31return Ability -- return the module