예제 #1
0
    IEnumerator SelectProcess()
    {
        Debug.Log("select process start");
        while (true)
        {
            if (!(isOnKey[1]) && Input.GetKey(KeyConfig[1]))
            {
                center = center == 0 ? musicList.music.Length + 1 : center - 1;
                canvas.ChangeMusic(center, difficulty);
                buttonManager.Replace(center);
            }
            if (!(isOnKey[4]) && Input.GetKey(KeyConfig[4]))
            {
                center = center == musicList.music.Length + 1 ? 0 : center + 1;
                canvas.ChangeMusic(center, difficulty);
                buttonManager.Replace(center);
            }
            if (!(isOnKey[3]) && Input.GetKey(KeyConfig[3]))
            {
                difficulty = (difficulty + 1) % 3;
                canvas.ChangeMusic(center, difficulty);
                buttonManager.ChangeDifficulty(difficulty);
            }
            if (!(isOnKey[6]) && Input.GetKey(KeyConfig[6]))
            {
                //決定
                if (center != 0 && center != musicList.music.Length + 1)
                {
                    Debug.Log("ここでゲームプレイに移る処理");
                    yield break;
                }
                else
                {
                    Debug.LogError("端につきゲームプレイ不可");
                }
            }
            //if (!(isOnKey[7]) && Input.GetKey(KeyConfig[7])) yield break;

            UpdateInput();
            yield return(new WaitForSeconds(fps));
        }
    }