public IEnumerator MoveEnd() { if (isMove) { yield break; } isMoveEnd = true; CMove.SetNowpos(nowPos[0], nowPos[1]); if (selectPos.Count >= 0) { //移動パスを配列に変更 int[,] moveTo = new int[selectPos.Count, 2]; for (int i = 0; i < selectPos.Count; i++) { moveTo [i, 0] = selectPos [i] [0]; moveTo [i, 1] = selectPos [i] [1]; } //移動していたら移動関数呼び出し if (moveTo.GetLength(0) > 0) { yield return(StartCoroutine(CMove.MoveTo(moveTo))); } selectPos.Clear(); selectMove = 0; } GameController.Gcon.SetGamePhase(Phase.MenuAtMoveEnd); yield return(StartCoroutine(MoveCost(nowPos[0], nowPos[1]))); isMoved = false; isMoveEnd = false; }