示例#1
0
 private void SendMouseMoveAction(MouseMoveAction action, NetworkStream stream)
 {
     // x | y
     WriteInt(action.Location.X, stream);
     WriteInt(action.Location.Y, stream);
 }
示例#2
0
        private MouseMoveAction GetMouseMoveAction(int senderId, NetworkStream stream)
        {
            var action = new MouseMoveAction();
            action.User = _manager.ClientList[senderId];

            // Get X
            int x = ReadInt(stream);

            // Get Y
            int y = ReadInt(stream);

            // Set location
            action.Location = new Point(x, y);

            return action;
        }