// entry内のデータをわかりやすい形式のデータに変換して返却する
    public MasterStageRecordDataList GetDataList()
    {
        MasterStageRecordDataList dataList = new MasterStageRecordDataList();

        List <MasterStageRecordData> list = new List <MasterStageRecordData>();

        foreach (Dictionary <string, object> dic in this.entry)
        {
            string stageName = ResponseObjectManager.GetStringFromDictionary(dic, "stagename");
            string bpm       = ResponseObjectManager.GetStringFromDictionary(dic, "bpm");
            string version   = ResponseObjectManager.GetStringFromDictionary(dic, "version");

            MasterStageRecordData data = new MasterStageRecordData();
            data.stageName = stageName;
            data.bpm       = bpm;
            data.version   = version;
            list.Add(data);

            //Debug.Log_lime("更新確認データ抽出 stageName=" + stageName + ", bpm = " + bpm + ", version = " + version);
        }

        dataList.dataList = list;

        return(dataList);
    }
Ejemplo n.º 2
0
    private IEnumerator setupMusicUI()
    {
        PlayRecordSaveDataDictionary playData = DataManager.Load <PlayRecordSaveDataDictionary>(DataManager.PLAY_RECORD_DATA);

        for (int i = 0; i < RhythmGameDataManager.masterStageRecordDataList.dataList.Count; i++)
        {
            MasterStageRecordData data      = RhythmGameDataManager.masterStageRecordDataList.dataList[i];
            MusicCell             musicCell = Object.Instantiate <MusicCell>(this.musicCellPrefab, this.scrollContent.transform);
            musicCell.Setup(data.stageName, playData);
            musicCell.RegisterCallbackPracticeButton(onClickPracticeButton);
            musicCell.RegisterCallbackStandardButton(onClickStandardButton);
        }
        yield return(null);
    }
Ejemplo n.º 3
0
    private void onClickRGStartButton(string stageName)
    {
        this.kickAudioSource.PlayOneShot(this.kickAudioSource.clip);

        Debug.Log_yellow("onClickRGStartButton > stageName = " + stageName, this);
        Debug.Log_yellow("onClickRGStartButton > count = " + RhythmGameDataManager.musicScoreDictionary.Count, this);


        RhythmGameDataManager.musicScoreRecordDataList = RhythmGameDataManager.musicScoreDictionary[stageName];

        for (int i = 0; i < RhythmGameDataManager.masterStageRecordDataList.dataList.Count; i++)
        {
            if (RhythmGameDataManager.masterStageRecordDataList.dataList[i].stageName == stageName)
            {
                RhythmGameDataManager.masterStageRecordData = RhythmGameDataManager.masterStageRecordDataList.dataList[i];
                break;
            }
        }
        MasterStageRecordData stageRecordData = RhythmGameDataManager.masterStageRecordDataList.dataList[this.currentStageIndex];

        StartCoroutine(loadSceneCoroutine("RhythmGame"));
    }
Ejemplo n.º 4
0
    private void setupTutorial()
    {
        setInformationText("TUTORIAL準備中");
        RhythmGameDataManager.masterStageRecordDataList          = new MasterStageRecordDataList();
        RhythmGameDataManager.masterStageRecordDataList.dataList = new List <MasterStageRecordData>();
        MasterStageRecordData stageRecordData = new MasterStageRecordData();

        stageRecordData.bpm       = "120";
        stageRecordData.stageName = "Introduction";
        stageRecordData.version   = "1";
        RhythmGameDataManager.masterStageRecordDataList.dataList.Add(stageRecordData);

        this.titleRoot.SetActive(false);
        this.menuRoot.SetActive(true);

        // 譜面を読み込み
        MusicScoreSaveDataDictionary musicScoreSaveDataDictionary = new MusicScoreSaveDataDictionary();

        MusicScoreSaveData musicScoreSaveData = new MusicScoreSaveData();

        musicScoreSaveData.musicScoreRecordDataList = new MasterMusicScoreRecordDataList();


        MasterMusicScoreRecordData musicScoreRecordData = new MasterMusicScoreRecordData();

        musicScoreRecordData.drum     = 1;
        musicScoreRecordData.position = 0;
        musicScoreSaveData.musicScoreRecordDataList.dataList.Add(musicScoreRecordData);

        musicScoreRecordData          = new MasterMusicScoreRecordData();
        musicScoreRecordData.drum     = 1;
        musicScoreRecordData.position = 48;
        musicScoreSaveData.musicScoreRecordDataList.dataList.Add(musicScoreRecordData);

        musicScoreRecordData          = new MasterMusicScoreRecordData();
        musicScoreRecordData.drum     = 1;
        musicScoreRecordData.position = 96;
        musicScoreSaveData.musicScoreRecordDataList.dataList.Add(musicScoreRecordData);

        musicScoreRecordData          = new MasterMusicScoreRecordData();
        musicScoreRecordData.drum     = 1;
        musicScoreRecordData.position = 144;
        musicScoreSaveData.musicScoreRecordDataList.dataList.Add(musicScoreRecordData);

        if (RhythmGameDataManager.musicScoreDictionary.ContainsKey("Introduction") == false)
        {
            RhythmGameDataManager.musicScoreDictionary.Add("Introduction", musicScoreSaveData.musicScoreRecordDataList);
        }

        PlayRecordSaveDataDictionary playData = new PlayRecordSaveDataDictionary();

        playData.practicePlayRecordSaveDataDictionary = new Dictionary <string, PlayRecordSaveData>();

        playData.standardPlayRecordSaveDataDictionary = new Dictionary <string, PlayRecordSaveData>();

        for (int i = 0; i < RhythmGameDataManager.masterStageRecordDataList.dataList.Count; i++)
        {
            MasterStageRecordData data      = RhythmGameDataManager.masterStageRecordDataList.dataList[i];
            MusicCell             musicCell = Object.Instantiate <MusicCell>(this.musicCellPrefab, this.scrollContent.transform);
            musicCell.Setup(data.stageName, playData);
            musicCell.RegisterCallbackPracticeButton(onClickPracticeButton);
            musicCell.RegisterCallbackStandardButton(onClickStandardButton);
        }


        setInformationText("TUTORIAL準備完了");
    }