Fix mirrored version of 'Next' piece. Reset rotation when a piece snaps
on the field.
This commit is contained in:
parent
489a043441
commit
73b47ebec9
Binary file not shown.
@ -68,7 +68,7 @@ public class GameCanvas extends JPanel implements KeyListener{
|
|||||||
g.fill3DRect(NEXTPIECE_DISPLAYX, NEXTPIECE_DISPLAYY, 104, 104, true);
|
g.fill3DRect(NEXTPIECE_DISPLAYX, NEXTPIECE_DISPLAYY, 104, 104, true);
|
||||||
for (Point p : nextPoints) {
|
for (Point p : nextPoints) {
|
||||||
g.setColor(Game.p.getNextShape().col.getColor());
|
g.setColor(Game.p.getNextShape().col.getColor());
|
||||||
g.fill3DRect(p.x*BLOCK_SIZE+NEXTPIECE_DISPLAYX+52, p.y*BLOCK_SIZE+NEXTPIECE_DISPLAYY+52, BLOCK_SIZE, BLOCK_SIZE, false);
|
g.fill3DRect(p.x*BLOCK_SIZE+NEXTPIECE_DISPLAYX+52, -p.y*BLOCK_SIZE+NEXTPIECE_DISPLAYY, BLOCK_SIZE, BLOCK_SIZE, false);
|
||||||
}
|
}
|
||||||
g.setColor(java.awt.Color.WHITE);
|
g.setColor(java.awt.Color.WHITE);
|
||||||
g.setFont(displayText);
|
g.setFont(displayText);
|
||||||
|
@ -20,6 +20,7 @@ public class Player {
|
|||||||
public void ShuffleNextPiece() {
|
public void ShuffleNextPiece() {
|
||||||
piece = nextPiece.clone();
|
piece = nextPiece.clone();
|
||||||
nextPiece = SelectRandomTetrimino();
|
nextPiece = SelectRandomTetrimino();
|
||||||
|
Game.rotation=0;
|
||||||
pos = new Point(5,21);
|
pos = new Point(5,21);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user