Fix ghost piece appearing on top of dropped piece

This commit is contained in:
Shadowfacts 2020-04-05 14:56:59 -04:00
parent 907d92b3b8
commit 9de568cb36
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 3 additions and 3 deletions

View File

@ -25,12 +25,12 @@ public struct BoardView: View {
ZStack(alignment: .topLeading) {
TilesView(board: self.$board)
if self.currentPiece != nil {
GamePieceView(size: min(geometry.size.width / CGFloat(self.board.width), geometry.size.height / CGFloat(self.board.height)), piece: self.currentPiece!)
}
if self.droppedPiece != nil {
GamePieceView(size: min(geometry.size.width / CGFloat(self.board.width), geometry.size.height / CGFloat(self.board.height)), piece: self.droppedPiece!, color: .gray, border: false)
}
if self.currentPiece != nil {
GamePieceView(size: min(geometry.size.width / CGFloat(self.board.width), geometry.size.height / CGFloat(self.board.height)), piece: self.currentPiece!)
}
}
}
}