1-- automatically generated by the FlatBuffers compiler, do not modify 2 3-- namespace: Example2 4 5local flatbuffers = require('flatbuffers') 6 7local Monster = {} -- the module 8local Monster_mt = {} -- the class metatable 9 10function Monster.New() 11 local o = {} 12 setmetatable(o, {__index = Monster_mt}) 13 return o 14end 15function Monster.GetRootAsMonster(buf, offset) 16 local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 17 local o = Monster.New() 18 o:Init(buf, n + offset) 19 return o 20end 21function Monster_mt:Init(buf, pos) 22 self.view = flatbuffers.view.New(buf, pos) 23end 24function Monster.Start(builder) builder:StartObject(0) end 25function Monster.End(builder) return builder:EndObject() end 26 27return Monster -- return the module