Hmmm - I'm not exactly sure.
I've had a dig on the INZ website, and the only thing I can see is
|Question: My employer has closed the business. What happens to my work permit?
Answer: If your permit was granted specifically for this job, and you are no longer employed there, your work permit becomes invalid. You must immediately change your status by making a new application. If you have a new job to go to, you should apply for a new work permit. Your other options are a visitor permit or a student permit, if you meet policy requirements for either of those applications.
If you are not eligible for any further permits in NZ, you should arrange your departure to avoid becoming unlawful.
(Sorry - I did try to give you a link so that you could see it, but my computer is playing silly b*ggers tonight...)
However, if you have a residency visa, it may be slightly different, so I'd check with your Case Officer to make sure.
Do be aware that you have rights if you have a signed contract and they pull out (even a formal verbal offer can be binding, but I'm not sure what you'd have to do to prove that you'd had it!!), however, I'm not sure how much that would help with the visa...