Draw the piece at their places at the start of the level #75

Merged
tonitch merged 1 commits from onLoadSavedPlacePiece into master 2023-05-19 00:32:13 +02:00

View File

@ -43,6 +43,11 @@ public class GameUI extends Group{
piece_space.y += _piece.boundary_size.y;
if(p.getPosition() != null){
_piece.setLayoutX(grid.getLayoutX() + p.getPosition().y * (SEGMENT_SIZE+SPACE_SIZE));
_piece.setLayoutY(grid.getLayoutY() + p.getPosition().x * (SEGMENT_SIZE+SPACE_SIZE));
}
// Pieces Events
_piece.setOnMouseClicked(event -> {
if(event.getButton() == MouseButton.SECONDARY){