// Cuando la canción se cargue, obtenemos las notas que tenga la misma protected override void OnSongLoaded() { // Almacenamos el momento que empezamos a obtener las notas System.Diagnostics.Stopwatch stopwatch = System.Diagnostics.Stopwatch.StartNew(); // Conseguimos la cantidad máxima cantidad de notas // Y seteamos la longitud de los bit array de notas actuales currentNoteInputs = (byte)useDifficulty; currentNotesLeft.Length = currentNoteInputs; currentLongNotes = new LongNoteInfo[currentNoteInputs]; // Obtenemos los grupos de notas, válidos, con tiempos únicos y // ordenados para evitar cualquier clase de problemas noteSheet = CurrentSong.GetNotesheet(useDifficulty); currentNotes = noteSheet.GetNoteGroupsValidated.Where(g => g.HasNotes) .Distinct(NoteGroup.timeComparer).OrderBy(n => n.Substep).ToArray(); // Debugeamos cuanto tardamos en obtener las notas stopwatch.Stop(); Debug.LogFormat("Loaded note sheet in {0} ms.", stopwatch.Elapsed.TotalMilliseconds); }