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

This commit is contained in:
Debucquoy Anthony 2023-05-18 20:17:17 +02:00
parent fed275ba09
commit f480e8a783
Signed by: tonitch
GPG Key ID: A78D6421F083D42E

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