コード例 #1
0
 void Update()
 {
     if (ovrGrabbable.isGrabbed)
     {
         if (!this.isGrabbled)
         {
             Bm98Debug.Instance.Log(dictMusicData["music_count"] + " : " + dictMusicData["#TITLE"]);
             musicSelectManager.setFolderCount(int.Parse(dictMusicData["music_count"]));
             musicSelectManager.localRecordCount = this.localRecordCount;
             playSe();
             this.isGrabbled = true;
         }
     }
     else
     {
         this.isGrabbled = false;
     }
 }
コード例 #2
0
 //次の曲
 public void nextMusic()
 {
     if (moveCount > 0)
     {
         return;
     }
     initMoveMusic();
     musicSelectManager.setFolderCount(
         musicSelectManager.getFolderCount() + 1
         );
     if (musicSelectManager.getFolderCount() >= musicSelectManager.listMusicDict.Count)
     {
         musicSelectManager.setFolderCount(0);
     }
     changeArrow("allow_right_blue");
     showInfomation(musicSelectManager.getDictMusicData());
     this.isRightAnim = true;
 }
コード例 #3
0
    private void GameSceneReloaded(Scene next, LoadSceneMode mode)
    {
        // シーン切り替え後のスクリプトを取得
        MusicSelectManager musicSelectManager = GameObject.Find("MusicSelectManager").GetComponent <MusicSelectManager>();

        musicSelectManager.setTotalCalorie(this.totalCalorie);
        musicSelectManager.setTotalFrameCount(this.totalFrameCount);
        musicSelectManager.setFolderCount(0);
        musicSelectManager.setMusicFolderPath(this.MUSIC_FOLDER_PATH);
        musicSelectManager.setCategory(this.category);
        musicSelectManager.setAvator(this.isAvator);
        SceneManager.sceneLoaded -= GameSceneReloaded;
    }
コード例 #4
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();
    }