• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 package MyGame.Example
4 
5 import java.nio.*
6 import kotlin.math.sign
7 import com.google.flatbuffers.*
8 
9 @Suppress("unused")
10 class Ability : Struct() {
11 
__initnull12     fun __init(_i: Int, _bb: ByteBuffer)  {
13         __reset(_i, _bb)
14     }
__assignnull15     fun __assign(_i: Int, _bb: ByteBuffer) : Ability {
16         __init(_i, _bb)
17         return this
18     }
19     val id : UInt get() = bb.getInt(bb_pos + 0).toUInt()
mutateIdnull20     fun mutateId(id: UInt) : ByteBuffer = bb.putInt(bb_pos + 0, id.toInt())
21     val distance : UInt get() = bb.getInt(bb_pos + 4).toUInt()
22     fun mutateDistance(distance: UInt) : ByteBuffer = bb.putInt(bb_pos + 4, distance.toInt())
23     companion object {
24         fun createAbility(builder: FlatBufferBuilder, id: UInt, distance: UInt) : Int {
25             builder.prep(4, 8)
26             builder.putInt(distance.toInt())
27             builder.putInt(id.toInt())
28             return builder.offset()
29         }
30     }
31 }
32