public void MotikinnShowMove(int kind, int TP) { mapdata = cont.GetComponent <Mapdata>(); int xynum; bool nifu = false; for (int y = 1; y < mapdata.GetmapWidth(); y++) { for (int x = 1; x < mapdata.GetmapWidth(); x++) { int ONE = 1; if (TP == 1) { if (y >= 7 && (kind == 50 || kind == 1)) { break; } if (y >= 6 && (kind == 50)) { break; } } else if (TP == 2) { if (y <= 1 && (kind == 50 || kind == 1)) { break; } if (y <= 2 && (kind == 50)) { break; } ONE = ONE * (-1); } if (kind == 1) { for (int k = 1; k < mapdata.GetmapWidth(); k++) { if (mapdata.map[x, k] == ONE) { nifu = true; } } if (nifu == true) { nifu = false; continue; } } if (mapdata.map[x, y] == 0) { xynum = ReturnXYnum(x, y); motikinnshow.transform.Find(xynum.ToString()).gameObject.SetActive(true); } } } }
public void ShowMove(int kind, int TP) { mapdata = cont.GetComponent <Mapdata>(); int indexnum; Vector2 rela; for (int y = 0; y < RelativeAreaW; y++) { for (int x = 0; x < RelativeAreaW; x++) { bool showflg = true; rela = RetRelativeMatlix(x, y, TP); indexnum = (y * RelativeAreaW) + x; if (indexnum == komaAreacenterIndex) { continue; } if (indexnum >= komaAreacenterIndex + 1) { indexnum--; } if (ableMove[indexnum] == true) { if (LocalKomaPos.y + rela.y >= mapdata.GetmapWidth()) { continue; } if (LocalKomaPos.y + rela.y <= 0) { continue; } if (LocalKomaPos.x + rela.x >= mapdata.GetmapWidth()) { continue; } if (LocalKomaPos.x + rela.x <= 0) { continue; } showflg = JudgmentFlg(rela, (int)LocalKomaPos.x, (int)LocalKomaPos.y, kind, TP, indexnum); if (showflg == true) { transform.Find("select" + indexnum.ToString()).gameObject.SetActive(true); } } } } }