コード例 #1
0
        static void Postfix(BasePlayer __instance, object __0)
        {
            var player = BasePlayerWrapper.Wrap(__instance);
            var note   = NoteWrapper.Wrap(__0);

            SongUI.Instance.MissNote(player, note);
        }
コード例 #2
0
        static void Prefix(BaseGuitarPlayer __instance, object __0)
        {
            var player = BasePlayerWrapper.Wrap(__instance);
            var note   = NoteWrapper.Wrap(__0);

            SongUI.Instance.HitNotePrefix(player, note);
        }
コード例 #3
0
        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];
            }
        }
コード例 #4
0
        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%";
            }
        }
コード例 #5
0
        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);
        }
コード例 #6
0
        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);
        }
コード例 #7
0
        static void Postfix(BasePlayer __instance, bool __0)
        {
            var player = BasePlayerWrapper.Wrap(__instance);

            SongUI.Instance.OverStrum(player, __0);
        }