Make processors and break overlay frame-stable

This commit is contained in:
smoogipoo
2019-12-25 14:35:32 +09:00
parent 85c44b5a5a
commit 977fb3d1bf
4 changed files with 34 additions and 36 deletions

View File

@ -3,13 +3,14 @@
using System;
using osu.Framework.Extensions.TypeExtensions;
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
namespace osu.Game.Rulesets.Scoring
{
public abstract class JudgementProcessor
public abstract class JudgementProcessor : Component
{
/// <summary>
/// Invoked when all <see cref="HitObject"/>s have been judged by this <see cref="JudgementProcessor"/>.
@ -47,10 +48,6 @@ namespace osu.Game.Rulesets.Scoring
Reset(true);
}
public virtual void ApplyElapsedTime(double elapsedTime)
{
}
/// <summary>
/// Applies the score change of a <see cref="JudgementResult"/> to this <see cref="ScoreProcessor"/>.
/// </summary>
@ -119,8 +116,6 @@ namespace osu.Game.Rulesets.Scoring
/// <param name="beatmap">The <see cref="IBeatmap"/> to simulate.</param>
protected virtual void SimulateAutoplay(IBeatmap beatmap)
{
HitObject lastObject = null;
foreach (var obj in beatmap.HitObjects)
simulate(obj);
@ -129,9 +124,6 @@ namespace osu.Game.Rulesets.Scoring
foreach (var nested in obj.NestedHitObjects)
simulate(nested);
if (lastObject != null)
ApplyElapsedTime(lastObject.GetEndTime() - obj.StartTime);
var judgement = obj.CreateJudgement();
if (judgement == null)
return;
@ -142,8 +134,6 @@ namespace osu.Game.Rulesets.Scoring
result.Type = judgement.MaxResult;
ApplyResult(result);
lastObject = obj;
}
}
}