static void Prefix(BaseGuitarPlayer __instance, object __0) { var player = BasePlayerWrapper.Wrap(__instance); var note = NoteWrapper.Wrap(__0); SongUI.Instance.HitNotePrefix(player, note); }
internal void HitNote(NoteWrapper note) { lastNoteActualTime = note.Time; lastNoteHitTime = gameManager.SongTime; if (lastNoteHitTime > lastNoteActualTime && (lastNoteHitTime - Time.deltaTime) < lastNoteActualTime) { lastNoteHitDifference = 0.0f; } else if (lastNoteHitTime > lastNoteActualTime) { lastNoteHitDifference = (float)(lastNoteHitTime - Time.deltaTime - lastNoteActualTime); } else if (lastNoteHitTime < lastNoteActualTime) { lastNoteHitDifference = (float)(lastNoteHitTime - lastNoteActualTime); } else { Logger.LogError("Panic?"); } noteHits.Add(lastNoteHitDifference); if (hitNotes == 0) { hitAccuracy = lastNoteHitDifference; } else { hitAccuracy = (hitAccuracy * hitNotes + lastNoteHitDifference) / (hitNotes + 1); } ++hitNotes; }
static void Postfix(BasePlayer __instance, object __0) { var player = BasePlayerWrapper.Wrap(__instance); var note = NoteWrapper.Wrap(__0); SongUI.Instance.MissNote(player, note); }
internal void HitNotePrefix(BasePlayerWrapper player, NoteWrapper note) { int playerIndex = player.Player.PlayerIndex; // The note flags are modified as the note is hit, so this must be detected as a prefix rather than postfix with the rest. if (note.IsStarPowerEnd) { ++starPowersGotten[playerIndex]; ++starPowersGotten[bandIndex]; } }
internal void HitNotePostfix(BasePlayerWrapper player, NoteWrapper note) { int playerIndex = player.Player.PlayerIndex; ++hitNotes[playerIndex]; ++hitNotes[bandIndex]; ++seenNotes[playerIndex]; ++seenNotes[bandIndex]; ++currentCombo[playerIndex]; highestCombo[playerIndex] = Math.Max(currentCombo[playerIndex], highestCombo[playerIndex]); ++currentCombo[bandIndex]; highestCombo[bandIndex] = Math.Max(currentCombo[bandIndex], highestCombo[bandIndex]); UpdateNotePercentages(playerIndex); UpdateNotePercentages(bandIndex); }
internal void MissNote(BasePlayerWrapper player, NoteWrapper note) { int playerIndex = player.Player.PlayerIndex; ++missedNotes[playerIndex]; ++missedNotes[bandIndex]; ++seenNotes[playerIndex]; ++seenNotes[bandIndex]; //TODO: Handle star powers missed. currentCombo[playerIndex] = 0; currentCombo[bandIndex] = 0; fcIndicator[playerIndex] = seenNotes[playerIndex] == hitNotes[playerIndex] ? (!player.FirstNoteMissed ? "FC" : "100%") : $"-{missedNotes[playerIndex]}"; fcIndicator[bandIndex] = seenNotes[bandIndex] == hitNotes[bandIndex] ? (!basePlayers.Any(b => b.FirstNoteMissed) ? "FC" : "100%") : $"-{missedNotes[bandIndex]}"; UpdateNotePercentages(playerIndex); UpdateNotePercentages(bandIndex); }
internal void MissNote(NoteWrapper note) { lastNoteActualTime = note.Time; lastNoteHitTime = gameManager.SongTime; lastNoteHitDifference = 0.07f; }
static void Postfix(object __0) { var note = NoteWrapper.Wrap(__0); AccuracyIndicator.Instance.MissNote(note); }
internal void MissNote(NoteWrapper note) { ++missedNotes; }
static void Postfix(object __0) { var note = NoteWrapper.Wrap(__0); PerfectMode.Instance.MissNote(note); }