Draw the piece at their places at the start of the level #75
@ -43,6 +43,11 @@ public class GameUI extends Group{
|
|||||||
|
|
||||||
piece_space.y += _piece.boundary_size.y;
|
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
|
// Pieces Events
|
||||||
_piece.setOnMouseClicked(event -> {
|
_piece.setOnMouseClicked(event -> {
|
||||||
if(event.getButton() == MouseButton.SECONDARY){
|
if(event.getButton() == MouseButton.SECONDARY){
|
||||||
|
Loading…
Reference in New Issue
Block a user