public void update_boundary1(Blocks1 block) { for (int y = 1; y < 20; y++) { for (int x = 1; x < 10; x++) { if (boundaryaxis[x, y] != null) { if (boundaryaxis[x, y].parent == block.transform) { boundaryaxis[x, y] = null; } } } } foreach (Transform mino in block.transform) { Vector2 pos = Round1(mino.position); if (pos.y < boundaryheight) { boundaryaxis[(int)pos.x, (int)pos.y] = mino; } } }
public bool isoverlimit1(Blocks1 theblock) { for (int x = 0; x < boundarywidth; ++x) { foreach (Transform mino in theblock.transform) { Vector2 theposition = Round1(mino.position); if (theposition.y >= 19) { return(true); } } } return(false); }