2021-12-03 05:29:19 +00:00
|
|
|
--[[ MyGame.Example.Test
|
2018-07-05 22:55:57 +00:00
|
|
|
|
2021-12-03 05:29:19 +00:00
|
|
|
Automatically generated by the FlatBuffers compiler, do not modify.
|
|
|
|
Or modify. I'm a message, not a cop.
|
|
|
|
|
2023-03-03 19:46:55 +00:00
|
|
|
flatc version: 23.3.3
|
2021-12-03 05:29:19 +00:00
|
|
|
|
|
|
|
Declared by : //monster_test.fbs
|
|
|
|
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
|
|
|
|
|
|
|
|
--]]
|
2018-07-05 22:55:57 +00:00
|
|
|
|
|
|
|
local flatbuffers = require('flatbuffers')
|
|
|
|
|
2021-12-03 05:29:19 +00:00
|
|
|
local Test = {}
|
|
|
|
local mt = {}
|
2018-07-05 22:55:57 +00:00
|
|
|
|
|
|
|
function Test.New()
|
2021-12-03 05:29:19 +00:00
|
|
|
local o = {}
|
|
|
|
setmetatable(o, {__index = mt})
|
|
|
|
return o
|
2018-07-05 22:55:57 +00:00
|
|
|
end
|
2021-12-03 05:29:19 +00:00
|
|
|
|
|
|
|
function mt:Init(buf, pos)
|
|
|
|
self.view = flatbuffers.view.New(buf, pos)
|
2018-07-05 22:55:57 +00:00
|
|
|
end
|
2021-12-03 05:29:19 +00:00
|
|
|
|
|
|
|
function mt:A()
|
|
|
|
return self.view:Get(flatbuffers.N.Int16, self.view.pos + 0)
|
2018-07-05 22:55:57 +00:00
|
|
|
end
|
2021-12-03 05:29:19 +00:00
|
|
|
|
|
|
|
function mt:B()
|
|
|
|
return self.view:Get(flatbuffers.N.Int8, self.view.pos + 2)
|
2018-07-05 22:55:57 +00:00
|
|
|
end
|
2021-12-03 05:29:19 +00:00
|
|
|
|
2018-07-05 22:55:57 +00:00
|
|
|
function Test.CreateTest(builder, a, b)
|
2021-12-03 05:29:19 +00:00
|
|
|
builder:Prep(2, 4)
|
|
|
|
builder:Pad(1)
|
|
|
|
builder:PrependInt8(b)
|
|
|
|
builder:PrependInt16(a)
|
|
|
|
return builder:Offset()
|
2018-07-05 22:55:57 +00:00
|
|
|
end
|
|
|
|
|
2021-12-03 05:29:19 +00:00
|
|
|
return Test
|