Doesn't matter if your home is foreclosed on or not.
If your fees are in arrears, you owe them for any amount that has accrued up until the date that the bank becomes the owner.
If that date happened already (you can check your county recorder) you still owe through that date. If it hasn't happened yet your debt is continuing to accrue.
Unfortunately, there is no defense to owing the money so it won't make any difference. If you ignore, the HOA gets a default judgment. If you defend, you lose and the HOA gets a judgment.
My advice (for the two cents it's worth) negotiate a cash settlement to get the suit dismissed.
Otherwise it's a lose-lose situation for you.