public void StopActiveTetrominoMovement() { activeTetromino.transform.position -= new Vector3(0, -1, 0); tetrisGrid.AddToGrid(activeTetromino); tetrisGrid.CheckForLines(); spawner.SpawnTetromino(); }
private void AddToGrid() { foreach (Transform child in transform) { Vector3 localPos = controller.transform.InverseTransformPoint(child.transform.position); int roundedX = Mathf.RoundToInt(localPos.x); int roundedY = Mathf.RoundToInt(localPos.y); grid.AddToGrid(child, roundedX, roundedY); } }