Home | History | Annotate | Download | only in Example
      1 # automatically generated by the FlatBuffers compiler, do not modify
      2 
      3 # namespace: Example
      4 
      5 import flatbuffers
      6 
      7 class Ability(object):
      8     __slots__ = ['_tab']
      9 
     10     # Ability
     11     def Init(self, buf, pos):
     12         self._tab = flatbuffers.table.Table(buf, pos)
     13 
     14     # Ability
     15     def Id(self): return self._tab.Get(flatbuffers.number_types.Uint32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0))
     16     # Ability
     17     def Distance(self): return self._tab.Get(flatbuffers.number_types.Uint32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(4))
     18 
     19 def CreateAbility(builder, id, distance):
     20     builder.Prep(4, 8)
     21     builder.PrependUint32(distance)
     22     builder.PrependUint32(id)
     23     return builder.Offset()
     24