Esempio n. 1
0
    public void SendDragPos(Vector2 pos)
    {
        MessageCommand message = new MessageCommand(1, 1, 8);

        message.WriteFloat(pos.x);
        message.WriteFloat(pos.y);
        socketClient.SendMessage(message);
    }
Esempio n. 2
0
    /// <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]);
        }
    }