Doodle Post
No Comments
// put breakable blocks in random places I dunno
for (var yy = 10; yy < grid.TileRows; yy++) {
for (var xx = 0; xx < grid.TileColumns; xx++) {
if (CheckRect(xx, yy, 2, 2)) {
continue;
}
if (Rand.Chance(config.BreakableChance)) {
if (breakables < breakablesMax) {
Scene.Add(new BreakableBlock(xx * 16, yy * 16));
gridBreakable.SetRect(xx, yy, 2, 2);
breakables++;
}
if (config.Width > 1500) {
xx++;
}
if (config.Width > 1000) {
xx++;
}
}
}
}