blob: 1b644d6ea396287d603eccdb24e2f8fed4630630 [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001// automatically generated by the FlatBuffers compiler, do not modify
2
3package MyGame.Example
4
5import java.nio.*
6import kotlin.math.sign
7import com.google.flatbuffers.*
8
9@Suppress("unused")
10@ExperimentalUnsignedTypes
11class Ability : Struct() {
12
13 fun __init(_i: Int, _bb: ByteBuffer) {
14 __reset(_i, _bb)
15 }
16 fun __assign(_i: Int, _bb: ByteBuffer) : Ability {
17 __init(_i, _bb)
18 return this
19 }
20 val id : UInt get() = bb.getInt(bb_pos + 0).toUInt()
21 fun mutateId(id: UInt) : ByteBuffer = bb.putInt(bb_pos + 0, id.toInt())
22 val distance : UInt get() = bb.getInt(bb_pos + 4).toUInt()
23 fun mutateDistance(distance: UInt) : ByteBuffer = bb.putInt(bb_pos + 4, distance.toInt())
24 companion object {
25 fun createAbility(builder: FlatBufferBuilder, id: UInt, distance: UInt) : Int {
26 builder.prep(4, 8)
27 builder.putInt(distance.toInt())
28 builder.putInt(id.toInt())
29 return builder.offset()
30 }
31 }
32}