Add pacman animation function.