摆棋阶段在叉下面显示被吃的子

This commit is contained in:
CalciteM Team 2019-06-29 10:24:47 +08:00
parent a44b0687de
commit a7f5f0a173
2 changed files with 12 additions and 6 deletions

Binary file not shown.

View File

@ -912,12 +912,18 @@ bool GameController::updateScence(NineChess &chess)
}
if (piece->pos() != pos) {
QPropertyAnimation *animation = new QPropertyAnimation(piece, "pos");
animation->setDuration(durationTime);
animation->setStartValue(piece->pos());
animation->setEndValue(pos);
animation->setEasingCurve(QEasingCurve::InOutQuad);
animationGroup->addAnimation(animation);
#ifdef GAME_PLACING_SHOW_CAPTURED_PIECES
if (chess.getStage() == NineChess::GAME_MOVING) {
#endif
QPropertyAnimation *animation = new QPropertyAnimation(piece, "pos");
animation->setDuration(durationTime);
animation->setStartValue(piece->pos());
animation->setEndValue(pos);
animation->setEasingCurve(QEasingCurve::InOutQuad);
animationGroup->addAnimation(animation);
#ifdef GAME_PLACING_SHOW_CAPTURED_PIECES
}
#endif
}
}