2D calculations of the collapse of magnetized gas cloud