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() { if (mNoteData != null) { MusicScoreData.addNote(mNoteData); } if (mLyricsData != null) { MusicScoreData.addLyrics(mLyricsData); } }
public override void run() { MusicScoreData.addNote(new Arg(new Dictionary <string, object>() { { "type", "note" }, { "time", mTime.mQuarterBeat }, { "consonant", " " }, { "vowel", "a" }, })); mSuccesAddLyrics = MusicScoreData.addLyrics(new Arg(new Dictionary <string, object>() { { "char", " " }, { "time", 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]); } } }