public CardRevealedToken(GameBoardView boardView, Card card, double delay) {
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(delay), cardToken);
animation.setOnFinished(this::secondTransition);
animation.setFromValue(0);
animation.setToValue(0);
animation.play();
}
CardRevealedToken.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:metastone
作者:
评论列表
文章目录