public bool IsType(HitObjectType type) { return(Type.IsType(type)); }
/// <summary> /// Updates the visible (combined) score and triggers any replay alterations required. /// </summary> /// <param name="trigger">The player that triggered this update.</param> private void UpdateVisibleScore(ScoreboardEntryExtended trigger) { int count300 = combinedScore.Count300; int count100 = combinedScore.Count100; int count50 = combinedScore.Count50; int countMiss = combinedScore.CountMiss; int totalScore = combinedScore.TotalScore; combinedScore.HpGraph = Player.currentScore.HpGraph; combinedScore.Reset(); foreach (int i in usedPlayerSlots) { Score thisScore = player.ScoreEntries[i].Score; if (thisScore == null) { continue; } combinedScore.TotalScore += thisScore.TotalScore; combinedScore.Count50 += thisScore.Count50; combinedScore.Count100 += thisScore.Count100; combinedScore.Count300 += thisScore.Count300; combinedScore.CountMiss += thisScore.CountMiss; combinedScore.CountGeki += thisScore.CountGeki; combinedScore.CountKatu += thisScore.CountKatu; combinedScore.CurrentHp = Math.Max(combinedScore.CurrentHp, thisScore.CurrentHp); combinedScore.MaxCombo = Math.Max(combinedScore.MaxCombo, thisScore.MaxCombo); } if (trigger != player.scoreEntry) { HitObjectType type = (HitObjectType)trigger.Frame.tagByte; if (type.IsType(HitObjectType.Normal)) //HitCircle { //Wasn't a result of the active player. if (combinedScore.Count50 > count50) { AlterReplay(IncreaseScoreType.Hit50); } else if (combinedScore.Count100 > count100) { AlterReplay(IncreaseScoreType.Hit100); } else if (combinedScore.CountMiss > countMiss) { AlterReplay(IncreaseScoreType.Miss); } } else if (type.IsType(HitObjectType.Slider)) { if (combinedScore.Count50 > count50) { AlterReplaySlider(IncreaseScoreType.Hit50); } else if (combinedScore.Count100 > count100) { AlterReplaySlider(IncreaseScoreType.Hit100); } else if (combinedScore.Count300 > count300) { AlterReplaySlider(IncreaseScoreType.Hit300); } else if (combinedScore.CountMiss > countMiss) { AlterReplaySlider(IncreaseScoreType.Miss); } } } player.Ruleset.ScoreDisplay.Update(combinedScore.TotalScore); }