private void CreateBuilding() { for (int x = 0; x < board.Width; x++) { for (int y = 0; y < board.Height; y++) { if (!board.CheckBlock(SubObjectTag.Floor, x, y)) { oPool.CreateObject( MainObjectTag.Building, board.GetBlockTag(x, y), x, y); } } } }
public void DrawRandomly() { int wall = 5; int count = 0; int[] index; int x; int y; while (count < wall) { index = RandomIndex(); x = index[0]; y = index[1]; if (board.CheckBlock(SubObjectTag.Floor, x, y)) { board.ChangeBlueprint(SubObjectTag.Wall, x, y); count++; } } }