Fix ghost piece appearing on top of dropped piece
This commit is contained in:
parent
907d92b3b8
commit
9de568cb36
|
@ -25,12 +25,12 @@ public struct BoardView: View {
|
||||||
ZStack(alignment: .topLeading) {
|
ZStack(alignment: .topLeading) {
|
||||||
TilesView(board: self.$board)
|
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 {
|
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)
|
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!)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue