Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. playerObj.yProperty().bind(player.yProperty());
  2.  
  3. pane.setOnKeyPressed(e -> {
  4. switch(e.getCode()) {
  5. case UP:
  6. player.goUp();
  7. System.out.println("player Y property: "+player.yProperty().getValue());
  8. System.out.println("playerObj Y property: "+playerObj.yProperty().getValue());
  9. break;
  10. }
  11. });
  12.  
  13. player Y property: 245.0
  14. playerObj Y property: 250.0
  15. player Y property: 240.0
  16. playerObj Y property: 250.0
  17. player Y property: 235.0
  18. playerObj Y property: 250.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement