Fixed transform animation.

This commit is contained in:
magenoxx 2011-10-04 20:14:04 +04:00
parent 3e195a521d
commit 06b83d8a5e

View file

@ -851,20 +851,21 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
if (transformed) {
BufferedImage night = ImageManagerImpl.getInstance().getNightImage();
dayNightButton.setIcon(new ImageIcon(night));
this.temporary = this.gameCard;
if (this.gameCard.getSecondCardFace() == null) {
log.error("no second side for card to transform!");
return;
}
if (!isPermanent) {
if (!isPermanent) { // use only for custom transformation (when pressing day-night button)
this.temporary = this.gameCard;
update(this.gameCard.getSecondCardFace());
}
updateImage();
} else {
BufferedImage day = ImageManagerImpl.getInstance().getDayImage();
dayNightButton.setIcon(new ImageIcon(day));
if (!isPermanent) { // use only for custom transformation (when pressing day-night button)
this.gameCard = this.temporary;
this.temporary = null;
if (!isPermanent) {
update(this.gameCard);
}
updateImage();