void hitLeftWall() { enenmy enemy = null; for (int i = width - 1; i > -1; --i) { for (int j = height - 1; j > -1; --j) { if (enemies[i, j] != null) { enemy = enemies[i, j].GetComponent <enenmy>(); enemy.left = !enemy.left; enemy.enemy_wallcollide = false; enemy.moveDown(); } } } }
void hitRightWall() { enenmy enemy = null; for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { if (enemies[i, j] != null) { enemy = enemies[i, j].GetComponent <enenmy>(); enemy.left = !enemy.left; enemy.enemy_wallcollide = false; enemy.moveDown(); } } } }