public void Generate(int x, int y, string type) { for (int i = 0; i < x; i++) { mapArray.Add(new List <MapCase>()); for (int j = 0; j < y; j++) { MapCase newCase = null; switch (type) { case "grass": newCase = new MapCase(GlobalsVar.MeshModels["grassGround"], i * 5, j * 5, 0, 5, 5, 0.098f); break; case "dalles": break; default: newCase = new MapCase(GlobalsVar.MeshModels["grassGround"], i * 5, j * 5, 0, 5, 5, 0.098f); break; } mapArray[i].Add(newCase); } } }
public void Generate(int x, int y, string type) { for (int i = 0; i < x; i++) { mapArray.Add(new List<MapCase>()); for (int j = 0; j < y; j++) { MapCase newCase = null; switch (type) { case "grass": newCase = new MapCase(GlobalsVar.MeshModels["grassGround"], i * 5, j * 5, 0, 5, 5, 0.098f); break; case "dalles": break; default: newCase = new MapCase(GlobalsVar.MeshModels["grassGround"], i * 5, j * 5, 0, 5, 5, 0.098f); break; } mapArray[i].Add(newCase); } } }