CardRevealedToken.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:metastone 作者:
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();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号