public void SendDragPos(Vector2 pos) { MessageCommand message = new MessageCommand(1, 1, 8); message.WriteFloat(pos.x); message.WriteFloat(pos.y); socketClient.SendMessage(message); }
/// <summary> /// 服务器向客户端发送图片位置 /// </summary> public void SendDragPos(Vector2 pos) { MessageCommand message = new MessageCommand(2, 1, 8); message.WriteFloat(pos.x); message.WriteFloat(pos.y); if (socketServer.Clients.Count > 0) { socketServer.SendMessage(message, socketServer.Clients[0]); } }