Add and consume passing state in GameplayBeatmap

This commit is contained in:
Dean Herbert
2020-05-01 20:05:56 +09:00
parent 3033ab80ce
commit ff1d63060d
4 changed files with 33 additions and 15 deletions

View File

@ -2,11 +2,14 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Beatmaps.Timing;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Screens.Play
{
@ -38,5 +41,14 @@ namespace osu.Game.Screens.Play
public IEnumerable<BeatmapStatistic> GetStatistics() => PlayableBeatmap.GetStatistics();
public IBeatmap Clone() => PlayableBeatmap.Clone();
public IBindable<bool> Passing => passing;
private readonly BindableBool passing = new BindableBool(true);
public void OnNewResult(JudgementResult result)
{
passing.Value = result.Type > HitResult.Miss;
}
}
}