public void ResetGame() { if (!_firstPlay) { //Removing all walls and blocks foreach (var wall in GameObject.FindGameObjectsWithTag("Wall")) { Destroy(wall); } foreach (var block in GameObject.FindGameObjectsWithTag("Block")) { Destroy(block); } LevelGenerator.ResetLevel(); } else { _firstPlay = false; } camera.Reset(); player.ResetPlayer(); }