Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- playerObj.yProperty().bind(player.yProperty());
- pane.setOnKeyPressed(e -> {
- switch(e.getCode()) {
- case UP:
- player.goUp();
- System.out.println("player Y property: "+player.yProperty().getValue());
- System.out.println("playerObj Y property: "+playerObj.yProperty().getValue());
- break;
- }
- });
- player Y property: 245.0
- playerObj Y property: 250.0
- player Y property: 240.0
- playerObj Y property: 250.0
- player Y property: 235.0
- playerObj Y property: 250.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement