Skip to content

Commit 18976e3

Browse files
committed
Rename board to mainBoard
1 parent 3db34ea commit 18976e3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Assets/Scenes/Tetris.unity

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ MonoBehaviour:
603603
m_Name:
604604
m_EditorClassIdentifier:
605605
tile: {fileID: 11400000, guid: a10927dec698b7c49b1375f89e8db4d2, type: 2}
606-
board: {fileID: 1887623656}
606+
mainBoard: {fileID: 1887623656}
607607
trackingPiece: {fileID: 1887623655}
608608
--- !u!1 &1887623652
609609
GameObject:

Assets/Scripts/Ghost.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
public class Ghost : MonoBehaviour
55
{
66
public Tile tile;
7-
public Board board;
7+
public Board mainBoard;
88
public Piece trackingPiece;
99

1010
public Tilemap tilemap { get; private set; }
@@ -46,22 +46,22 @@ private void Drop()
4646
Vector3Int position = this.trackingPiece.position;
4747

4848
int current = position.y;
49-
int bottom = -this.board.boardSize.y / 2 - 1;
49+
int bottom = -this.mainBoard.boardSize.y / 2 - 1;
5050

51-
this.board.Clear(this.trackingPiece);
51+
this.mainBoard.Clear(this.trackingPiece);
5252

5353
for (int row = current; row >= bottom; row--)
5454
{
5555
position.y = row;
5656

57-
if (this.board.IsValidPosition(this.trackingPiece, position)) {
57+
if (this.mainBoard.IsValidPosition(this.trackingPiece, position)) {
5858
this.position = position;
5959
} else {
6060
break;
6161
}
6262
}
6363

64-
this.board.Set(this.trackingPiece);
64+
this.mainBoard.Set(this.trackingPiece);
6565
}
6666

6767
private void Set()

0 commit comments

Comments
 (0)