示例#1
0
        private void GenerateStandardNotes(GameSong song, Beatline bl)
        {
            // Add a beatline note for every phrase (4 beats), unless its listed in the
            // RemoveNotes or SuperNotes collection.
            for (int beat = 0; beat < song.GetEndingTimeInPhrase(); beat++)
            {
                if (song.RemoveNotes.Contains(beat))
                {
                    continue;
                }
                if (song.SuperNotes.Contains(beat))
                {
                    continue;
                }
                bl.AddBeatlineNote(new BeatlineNote {
                    Position = beat
                });
            }

            foreach (var pos in song.AddNotes)
            {
                bl.AddBeatlineNote(new BeatlineNote {
                    Position = pos
                });
            }

            foreach (var pos in song.SuperNotes)
            {
                bl.AddBeatlineNote(new BeatlineNote {
                    Position = pos, NoteType = BeatlineNoteType.Super
                });
            }
        }
示例#2
0
 private void GenerateSongEndNote(GameSong song, Beatline bl)
 {
     bl.AddBeatlineNote(new BeatlineNote
     {
         NoteType = BeatlineNoteType.EndOfSong,
         Position = song.GetEndingTimeInPhrase()
     });
 }
示例#3
0
        private void DrawBeatline(GameTime gameTime)
        {
            if (PageNumber != 2)
            {
                return;
            }
            var diff = gameTime.TotalRealTime.TotalSeconds - _startTime;


            _phraseNumber = diff * BEATLINE_BPM / 240;
            TextureManager.LastDrawnPhraseNumber = _phraseNumber;
            if (_phraseNumber + 2 > _lastBeatline)
            {
                _beatline.AddBeatlineNote(
                    new BeatlineNote {
                    Position = _lastBeatline + 1, NoteType = BeatlineNoteType.Normal
                });
                _lastBeatline++;
            }

            _beatline.Draw(_phraseNumber);
            _beatline.TrimExpired(_phraseNumber);
        }