...

Text file src/github.com/google/flatbuffers/tests/MyGame/Example/Ability.nim

Documentation: github.com/google/flatbuffers/tests/MyGame/Example

     1#[ MyGame.Example.Ability
     2  Automatically generated by the FlatBuffers compiler, do not modify.
     3  Or modify. I'm a message, not a cop.
     4
     5  flatc version: 23.5.26
     6
     7  Declared by  : 
     8  Rooting type : MyGame.Example.Monster ()
     9]#
    10
    11import flatbuffers
    12
    13type Ability* = object of FlatObj
    14func id*(self: Ability): uint32 =
    15  return Get[uint32](self.tab, self.tab.Pos + 0)
    16func `id=`*(self: var Ability, n: uint32): bool =
    17  return self.tab.Mutate(self.tab.Pos + 0, n)
    18func distance*(self: Ability): uint32 =
    19  return Get[uint32](self.tab, self.tab.Pos + 4)
    20func `distance=`*(self: var Ability, n: uint32): bool =
    21  return self.tab.Mutate(self.tab.Pos + 4, n)
    22proc AbilityCreate*(self: var Builder, id: uint32, distance: uint32): uoffset =
    23  self.Prep(4, 8)
    24  self.Prepend(distance)
    25  self.Prepend(id)
    26  return self.Offset()

View as plain text