//小節生成 private Bar createBar(KeyTime aBarNum) { Bar tBar = MyBehaviour.createObjectFromPrefab <Bar>("score/bar" + MusicScoreData.mRhythm.ToString()); tBar.mTime = aBarNum; //音符追加 List <Arg> tNotes = MusicScoreData.getNotesInBar(aBarNum); foreach (Arg tNoteData in tNotes) { tBar.addNote(tNoteData); } //歌詞追加 List <Arg> tLyrics = MusicScoreData.getLyricsInBar(aBarNum); foreach (Arg tLyricsData in tLyrics) { tBar.addLyrics(tLyricsData); } //bpm変化を示すオブジェクト追加 List <Arg> tBpms = MusicScoreData.getChangeBpmInBar(aBarNum); foreach (Arg tBpm in tBpms) { tBar.addChangeBpm(tBpm); } //位置調整 tBar.transform.parent = gameObject.transform; tBar.transform.localPosition = new Vector3(0, convertToPositionY(tBar.mTime.mBarNum), 0); tBar.transform.localScale = new Vector3(1f, 1f, 1f); tBar.name = "bar:" + aBarNum.mBarNum; return(tBar); }