public override void undo() { //もともとあるデータを削除 foreach (float tTime in new float[3] { mTime.mQuarterBeat + 0.1f, mTime.mQuarterBeat + 1.3f, mTime.mQuarterBeat + 2.6f }) { MusicScoreData.deleteChangeBpm(tTime); MusicScoreData.deleteLyrics(tTime); MusicScoreData.deleteNote(tTime); } //生成し直し for (int i = 0; i < 4; i++) { if (mBpmData[i] != null) { mBpmData[i].set("time", mTime.mQuarterBeat + i); MusicScoreData.addChangeBpm(mBpmData[i]); } if (mLyricsData[i] != null) { mLyricsData[i].set("time", mTime.mQuarterBeat + i); MusicScoreData.addLyrics(mLyricsData[i]); } if (mNoteData[i] != null) { mNoteData[i].set("time", mTime.mQuarterBeat + i); MusicScoreData.addNote(mNoteData[i]); } } }
public override void run() { //もともとあるデータを削除して記憶 float[] tTripletTimes = new float[3] { mTime.mQuarterBeat + 0.1f, mTime.mQuarterBeat + 1.3f, mTime.mQuarterBeat + 2.6f }; for (int i = 0; i < 3; i++) { mBpmData[i] = MusicScoreData.deleteChangeBpm(tTripletTimes[i]); mLyricsData[i] = MusicScoreData.deleteLyrics(tTripletTimes[i]); mNoteData[i] = MusicScoreData.deleteNote(tTripletTimes[i]); } //生成し直し float[] tNewTime = new float[3] { mTime.mQuarterBeat + 0, mTime.mQuarterBeat + 1, mTime.mCorrectQuarterBeat + 3 }; for (int i = 0; i < 3; i++) { if (mBpmData[i] != null) { mBpmData[i].set("time", tNewTime[i]); MusicScoreData.addChangeBpm(mBpmData[i]); } if (mLyricsData[i] != null) { mLyricsData[i].set("time", tNewTime[i]); MusicScoreData.addLyrics(mLyricsData[i]); } if (mNoteData[i] != null) { mNoteData[i].set("time", tNewTime[i]); MusicScoreData.addNote(mNoteData[i]); } } }
public override void undo() { MusicScoreData.deleteNote(mTime.mQuarterBeat); if (mSuccesAddLyrics) { MusicScoreData.deleteLyrics(mTime.mQuarterBeat); } }
public override void run() { //もともとあるデータを削除して記憶 for (int i = 0; i < 4; i++) { mBpmData[i] = MusicScoreData.deleteChangeBpm(mTime.mQuarterBeat + i); mLyricsData[i] = MusicScoreData.deleteLyrics(mTime.mQuarterBeat + i); mNoteData[i] = MusicScoreData.deleteNote(mTime.mQuarterBeat + i); } //生成し直し float[] tNewTime = new float[4] { mTime.mQuarterBeat + 0.1f, mTime.mQuarterBeat + 1.3f, 0, mTime.mQuarterBeat + 2.6f }; for (int i = 0; i < 4; i++) { if (i == 2) { continue; } if (mBpmData[i] != null) { mBpmData[i].set("time", tNewTime[i]); MusicScoreData.addChangeBpm(mBpmData[i]); } if (mLyricsData[i] != null) { mLyricsData[i].set("time", tNewTime[i]); MusicScoreData.addLyrics(mLyricsData[i]); } if (mNoteData[i] != null) { mNoteData[i].set("time", tNewTime[i]); MusicScoreData.addNote(mNoteData[i]); } } }
public override void run() { mNoteData = MusicScoreData.deleteNote(mTime.mQuarterBeat); mLyricsData = MusicScoreData.deleteLyrics(mTime.mQuarterBeat); }