Esempio n. 1
0
 //クリックされた時の動作
 public void clickRecord()
 {
     if (musicSelectManager.getFolderCount() != int.Parse(dictMusicData["music_count"]))
     {
         Bm98Debug.Instance.Log(dictMusicData["music_count"] + " : " + dictMusicData["#TITLE"]);
         musicSelectManager.setFolderCount(int.Parse(dictMusicData["music_count"]));
         musicSelectManager.localRecordCount = this.localRecordCount;
         playSe();
     }
     else
     {
         musicSelectManager.selectedMusic();
     }
 }
Esempio n. 2
0
    public void startRandomly()
    {
        //そもそも開始されてない場合
        if (!musicSelectManager.isReady)
        {
            return;
        }

        List <Dictionary <string, string> > listRandomMusicDict = new List <Dictionary <string, string> >();

        foreach (Dictionary <string, string> musicDictData in musicSelectManager.listMusicDict)
        {
            if (musicDictData.ContainsKey("#PLAYLEVEL"))
            {
                try {
                    int level = int.Parse(musicDictData["#PLAYLEVEL"]);
                    if ((level >= LEVEL_MIN) && (level <= LEVEL_MAX))
                    {
                        listRandomMusicDict.Add(musicDictData);
                    }
                }
                catch {
                    Debug.LogError("プレイレベルが不正です。");
                }
            }
        }
        //無かった場合
        if (listRandomMusicDict.Count == 0)
        {
            return;
        }

        int r = Random.Range(0, listRandomMusicDict.Count);

        musicSelectManager.setFolderCount(int.Parse(listRandomMusicDict[r]["music_count"]));
        musicSelectManager.selectedMusic();
    }