• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Code generated by the FlatBuffers compiler. DO NOT EDIT.
2
3package Example
4
5import (
6	flatbuffers "github.com/google/flatbuffers/go"
7)
8
9type Ability struct {
10	_tab flatbuffers.Struct
11}
12
13func (rcv *Ability) Init(buf []byte, i flatbuffers.UOffsetT) {
14	rcv._tab.Bytes = buf
15	rcv._tab.Pos = i
16}
17
18func (rcv *Ability) Table() flatbuffers.Table {
19	return rcv._tab.Table
20}
21
22func (rcv *Ability) Id() uint32 {
23	return rcv._tab.GetUint32(rcv._tab.Pos + flatbuffers.UOffsetT(0))
24}
25func (rcv *Ability) MutateId(n uint32) bool {
26	return rcv._tab.MutateUint32(rcv._tab.Pos+flatbuffers.UOffsetT(0), n)
27}
28
29func (rcv *Ability) Distance() uint32 {
30	return rcv._tab.GetUint32(rcv._tab.Pos + flatbuffers.UOffsetT(4))
31}
32func (rcv *Ability) MutateDistance(n uint32) bool {
33	return rcv._tab.MutateUint32(rcv._tab.Pos+flatbuffers.UOffsetT(4), n)
34}
35
36func CreateAbility(builder *flatbuffers.Builder, id uint32, distance uint32) flatbuffers.UOffsetT {
37	builder.Prep(4, 8)
38	builder.PrependUint32(distance)
39	builder.PrependUint32(id)
40	return builder.Offset()
41}
42