/// <summary> /// ランダムなマップを作製 /// </summary> public void CreateRandomMap() { // 現在のすべてのオブジェクトを破棄 holder.ClearAll(); RandomMapLandRatio landRatio = new RandomMapLandRatio(new LandRatioPatternNormal()); string text = dropdownLandPattern.captionText.text; if (text == "Half") { landRatio = new RandomMapLandRatio(new LandRatioPatternHalf()); } else if (text == "Triple") { landRatio = new RandomMapLandRatio(new LandRatioPatternTriple()); } RandomMapCreator creator = new RandomMapCreator(landRatio); int x = int.Parse(inputFieldSizeX.text); int y = int.Parse(inputFieldSizeY.text); // 陸地を作成 int[,] map = creator.CreateInitialLandMap(x, y); currentMap = map; // タイルに変換 mapTileGenerator.CreateMapTile(map); }
public RandomMapCreator(RandomMapLandRatio landRatio) { this.landRatio = landRatio; }