We perform N-body simulations of the dynamical evolution of a dwarf galaxy falling into the Milky Way galaxy in order to understand the formation scenario of the peculiar globular cluster $omega$ Centauri. We use self-consistent models of the bulge and the disc of the Milky Way, as well as of the dwarf galaxy, and explore a range of dwarf models with different density distributions. Namely, we use King (1966) and Hernquist (1990) density profiles to model the density distribution in the dwarf. The central region of our King model has a density profile approximately $propto r^{-2}$, while that of the Hernquist model is $propto r^{-1}$. The difference in the dwarfs density distributions leads to distinct evolutionary scenarios. The King model dwarf loses its mass exponentially as a function of apocentric distance, with the mass-loss rate depending on the initial mass and size of the dwarf. Regardless of the initial mass and size, the King model dwarf remains more massive than $10^8$ msun after a few Gyr of evolution. The Hernquist model dwarf experiences an accelerated mass loss, and the mass of the remnant falls below $10^8$ msun within a few Gyr. By exploring an appropriate set of parameters, we find a Hernquist model that can attain the mass and orbital characteristics of $omega$ Cen after a few Gyr.