static void Postfix(BasePlayer __instance, object __0) { var player = BasePlayerWrapper.Wrap(__instance); var note = NoteWrapper.Wrap(__0); SongUI.Instance.MissNote(player, note); }
static void Prefix(BaseGuitarPlayer __instance, object __0) { var player = BasePlayerWrapper.Wrap(__instance); var note = NoteWrapper.Wrap(__0); SongUI.Instance.HitNotePrefix(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 OverStrum(BasePlayerWrapper player, bool strummed) { int playerIndex = player.Player.PlayerIndex; //TODO: Handle star powers missed. currentCombo[playerIndex] = 0; currentCombo[bandIndex] = 0; if (seenNotes[playerIndex] == hitNotes[playerIndex]) { fcIndicator[playerIndex] = "100%"; } if (seenNotes[bandIndex] == hitNotes[bandIndex]) { fcIndicator[bandIndex] = "100%"; } }
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); }
static void Postfix(BasePlayer __instance, bool __0) { var player = BasePlayerWrapper.Wrap(__instance); SongUI.Instance.OverStrum(player, __0); }