Draw the piece at their places at the start of the level
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Debucquoy Anthony 2023-05-18 20:17:17 +02:00 committed by Gitea
parent 774c594cb8
commit 41be423f94

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){