// 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);
    }
Пример #2
0
    // entry内のデータをわかりやすい形式のデータに変換して返却する
    public MasterMusicScoreRecordDataList GetDataList()
    {
        MasterMusicScoreRecordDataList dataList = new MasterMusicScoreRecordDataList();

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

        foreach (Dictionary <string, object> dic in this.entry)
        {
            MasterMusicScoreRecordData data = new MasterMusicScoreRecordData();

            string position = ResponseObjectManager.GetStringFromDictionary(dic, "position");
            data.position = uint.Parse(position);

            string drum = ResponseObjectManager.GetStringFromDictionary(dic, "drum");
            if (uint.TryParse(drum, out data.drum) == false)
            {
                data.drum = 0;
            }

            string snare = ResponseObjectManager.GetStringFromDictionary(dic, "snare");
            if (uint.TryParse(snare, out data.snare) == false)
            {
                data.snare = 0;
            }

            string hihat = ResponseObjectManager.GetStringFromDictionary(dic, "hihat");
            if (uint.TryParse(hihat, out data.hihat) == false)
            {
                data.hihat = 0;
            }

            list.Add(data);
        }

        dataList.dataList = list;

        return(dataList);
    }