...
1<?php
2// automatically generated by the FlatBuffers compiler, do not modify
3
4namespace MyGame\Example;
5
6use \Google\FlatBuffers\Struct;
7use \Google\FlatBuffers\Table;
8use \Google\FlatBuffers\ByteBuffer;
9use \Google\FlatBuffers\FlatBufferBuilder;
10
11class Ability extends Struct
12{
13 /**
14 * @param int $_i offset
15 * @param ByteBuffer $_bb
16 * @return Ability
17 **/
18 public function init($_i, ByteBuffer $_bb)
19 {
20 $this->bb_pos = $_i;
21 $this->bb = $_bb;
22 return $this;
23 }
24
25 /**
26 * @return uint
27 */
28 public function GetId()
29 {
30 return $this->bb->getUint($this->bb_pos + 0);
31 }
32
33 /**
34 * @return uint
35 */
36 public function GetDistance()
37 {
38 return $this->bb->getUint($this->bb_pos + 4);
39 }
40
41
42 /**
43 * @return int offset
44 */
45 public static function createAbility(FlatBufferBuilder $builder, $id, $distance)
46 {
47 $builder->prep(4, 8);
48 $builder->putUint($distance);
49 $builder->putUint($id);
50 return $builder->offset();
51 }
52}
View as plain text