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 }); } }
private void GenerateSongEndNote(GameSong song, Beatline bl) { bl.AddBeatlineNote(new BeatlineNote { NoteType = BeatlineNoteType.EndOfSong, Position = song.GetEndingTimeInPhrase() }); }
public override void Initialize() { _gameSong = (GameSong)Core.Cookies["CurrentSong"]; var currentGameType = (GameType)Core.Cookies["CurrentGameType"]; _performanceBar = new PerformanceBar { Metrics = Core.Metrics, Players = Core.Players, GameType = currentGameType }; _performanceBar.SetPosition(); _lifeBarSet = new LifeBarSet(Core.Metrics, Core.Players, currentGameType); _lifeBarSet.BlazingEnded += ((sender, e) => _noteBarSet.CancelReverse((int)e.Object)); _levelbarSet = new LevelBarSet(Core.Metrics, Core.Players, currentGameType); _hitsBarSet = new HitsBarSet(Core.Metrics, Core.Players, currentGameType); _scoreSet = new ScoreSet(Core.Metrics, Core.Players, currentGameType); _noteJudgementSet = new NoteJudgementSet(Core.Metrics, Core.Players, currentGameType, _lifeBarSet, _scoreSet); _countdownSet = new CountdownSet(Core.Metrics, Core.Players, currentGameType); _beatlineSet = new BeatlineSet(Core.Metrics, Core.Players, currentGameType); _gmBarSet = new GrooveMomentumBarSet(Core.Metrics, Core.Players, currentGameType); _hitAggregator = new BeatlineHitAggregator(Core.Players, currentGameType); _hitAggregator.HitsAggregated += HitsAggregated; _noteBarSet = new NoteBarSet(Core.Metrics, Core.Players, currentGameType); _noteBarSet.PlayerFaulted += (PlayerFaulted); _noteBarSet.PlayerArrowHit += (PlayerArrowHit); _songTimeLine = new SongTimeLine { Position = Core.Metrics["MainGameSongTimeline", 0], Size = Core.Metrics["MainGameSongTimeline.Size", 0] }; _beatlineSet.NoteMissed += BeatlineNoteMissed; _beatlineSet.CPUNoteHit += BeatlineNoteCPUHit; _recordReplayer = new RecordReplayer(currentGameType); _recordReplayer.LoadRecord(_gameSong.GetHashCode(), currentGameType); _recordReplayer.Position = Core.Metrics["RecordReplayer", GetFreeLocation()]; _recordReplayer.Size = Core.Metrics["RecordReplayer.Size", 0]; _displayState = 0; _songLoadDelay = 0.0; _lastLifeRecord = 0.5; _lastUpdate = 0.0; for (int x = 0; x < PLAYER_COUNT; x++) { _lifeBarSet.Reset(); Core.Players[x].ResetStats(); } _noteBarSet.InitNoteBars(); _startTime = null; _dspActive = false; _panic = Core.Cookies.ContainsKey("Panic"); _beatlineSet.EndingPhrase = _gameSong.GetEndingTimeInPhrase(); _beatlineSet.Bpm = _gameSong.CurrentBPM(0.0); _beatlineSet.AddTimingPointMarkers(_gameSong); _beatlineSet.SetSpeeds(); _noteBarSet.Visible = true; _visualBackground = new VisualizerBackground { Size = Core.Metrics["VisualizerBackground.Size", 0], AudioManager = Core.Audio, Position = Core.Metrics["VisualizerBackground", 0], SongChannel = (int)Core.Cookies["GameSongChannel"], MaxBrightness = Convert.ToByte(Core.Settings["BackgroundAnimation"]) }; InitSprites(); base.Initialize(); }