Exemplo n.º 1
0
        private static void GenerateBPMChangeNotes(GameSong song, Beatline bl)
        {
            double prev = song.BPMs[0.0];

            foreach (double bpmKey in song.BPMs.Keys)
            {
                //Don't mark the starting BPM as a BPM change.
                if (bpmKey == 0.0)
                {
                    continue;
                }

                //Don't mark a BPM change if there isn't actually a change in the BPM.
                if (song.BPMs[bpmKey] == prev)
                {
                    continue;
                }

                var noteType = song.BPMs[bpmKey] > prev
                                   ? BeatlineNoteType.BPMIncrease
                                   : BeatlineNoteType.BPMDecrease;


                bl.InsertBeatlineNote(new BeatlineNote {
                    NoteType = noteType, Position = bpmKey
                }, 0);

                prev = song.BPMs[bpmKey];
            }
        }
Exemplo n.º 2
0
 private static void GenerateStopNotes(GameSong song, Beatline bl)
 {
     foreach (var stopKey in song.Stops.Keys)
     {
         bl.InsertBeatlineNote(
             new BeatlineNote {
             NoteType = BeatlineNoteType.Stop, Position = stopKey
         }, 0);
     }
 }