示例#1
0
 public static Offset <PlayerUpdatePacket> CreatePlayerUpdatePacket(FlatBufferBuilder builder,
                                                                    short opcode = 3,
                                                                    float pos_x  = 0.0f,
                                                                    float pos_y  = 0.0f)
 {
     builder.StartObject(3);
     PlayerUpdatePacket.AddPosY(builder, pos_y);
     PlayerUpdatePacket.AddPosX(builder, pos_x);
     PlayerUpdatePacket.AddOpcode(builder, opcode);
     return(PlayerUpdatePacket.EndPlayerUpdatePacket(builder));
 }
示例#2
0
 public static PlayerUpdatePacket GetRootAsPlayerUpdatePacket(ByteBuffer _bb, PlayerUpdatePacket obj)
 {
     return(obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb));
 }