public override byte[] toBinary() { writer = new st.net.NetBase.ByteWriter(); writer.write_int(oid); writer.write_int(obj_sort); writer.write_float(dir); writer.write_byte(is_path_move); ushort lenpoint_list = (ushort)point_list.Count; writer.write_short(lenpoint_list); for (int i_point_list = 0; i_point_list < lenpoint_list; i_point_list++) { st.net.NetBase.point3 listData = point_list[i_point_list]; listData.toBinary(writer); } return(writer.data); }
public override void fromBinary(byte[] binary) { reader = new st.net.NetBase.ByteReader(binary); oid = reader.Read_uint(); obj_sort = reader.Read_uint(); dir = reader.Read_float(); is_path_move = reader.Read_byte(); ushort lenpoint_list = reader.Read_ushort(); point_list = new List <st.net.NetBase.point3>(); for (int i_point_list = 0; i_point_list < lenpoint_list; i_point_list++) { st.net.NetBase.point3 listData = new st.net.NetBase.point3(); listData.fromBinary(reader); point_list.Add(listData); } }