public void InitProcces() { //stageName = MapDate.eStageName.eFirstStage; GetComponent <MapPositioning>().FirstProccess(); haveMapData = GetComponent <MapDate>(); MapCreater = GetComponent <MapPositioning>(); }
public void MapCreate2(int x, int z) { for (int i = 0; i < z; i++) { for (int j = 0; j < x; j++) { MapDate map = new MapDate(data.StageDataGet(j, i), j, i, data.StageLevelData(j, i)); MapDates2.Add(map); if (data.StageLevelData(j, i) != 0) { GameObject mapPanel = Instantiate(panel); mapPanel.transform.position = new Vector3(j * 10, data.StageLevelData(j, i), i * 10); mapPanel.transform.SetParent(transform); } } } }
/// <summary> /// マップ生成 /// </summary> /// <param name="x">X軸</param> /// <param name="z">Z軸</param> public void MapCreate(int x, int z) { for (int i = 0; i < x; i++) { List <MapDate> mapX = new List <MapDate>(); for (int j = 0; j < z; j++) { float y = 0; MapType type = MapType.Normal; if (i > 1 && i < 8 && j > 1 && j < 8) { y = 2.0f; //type = MapType.Wasteland; } MapDate mapZ = new MapDate(type, i, j, y); mapX.Add(mapZ); } MapDates.Add(mapX); } }