public CardPlayedToken(GameBoardView boardView, Card card) {
Window parent = boardView.getScene().getWindow();
this.cardToken = new CardTooltip();
popup = new Popup();
popup.getContent().setAll(cardToken);
popup.setX(parent.getX() + 40);
popup.show(parent);
popup.setY(parent.getY() + parent.getHeight() * 0.5 - cardToken.getHeight() * 0.5);
cardToken.setCard(card);
NotificationProxy.sendNotification(GameNotification.ANIMATION_STARTED);
FadeTransition animation = new FadeTransition(Duration.seconds(1.2), cardToken);
animation.setDelay(Duration.seconds(0.6f));
animation.setOnFinished(this::onComplete);
animation.setFromValue(1);
animation.setToValue(0);
animation.play();
}
CardPlayedToken.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:metastone
作者:
评论列表
文章目录