mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
Fixed transform animation.
This commit is contained in:
parent
3e195a521d
commit
06b83d8a5e
1 changed files with 17 additions and 16 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue