Esempio n. 1
0
        static void Prefix(BaseGuitarPlayer __instance, object __0)
        {
            var player = BasePlayerWrapper.Wrap(__instance);
            var note   = NoteWrapper.Wrap(__0);

            SongUI.Instance.HitNotePrefix(player, note);
        }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
        static void Postfix(BasePlayer __instance, object __0)
        {
            var player = BasePlayerWrapper.Wrap(__instance);
            var note   = NoteWrapper.Wrap(__0);

            SongUI.Instance.MissNote(player, note);
        }
Esempio n. 4
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];
            }
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 7
0
 internal void MissNote(NoteWrapper note)
 {
     lastNoteActualTime    = note.Time;
     lastNoteHitTime       = gameManager.SongTime;
     lastNoteHitDifference = 0.07f;
 }
Esempio n. 8
0
        static void Postfix(object __0)
        {
            var note = NoteWrapper.Wrap(__0);

            AccuracyIndicator.Instance.MissNote(note);
        }
Esempio n. 9
0
 internal void MissNote(NoteWrapper note)
 {
     ++missedNotes;
 }
Esempio n. 10
0
        static void Postfix(object __0)
        {
            var note = NoteWrapper.Wrap(__0);

            PerfectMode.Instance.MissNote(note);
        }