2020-02-14 03:30:11 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
2020-05-01 11:05:56 +00:00
|
|
|
using osu.Framework.Bindables;
|
2020-02-14 03:30:11 +00:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
using osu.Game.Beatmaps.ControlPoints;
|
|
|
|
using osu.Game.Beatmaps.Timing;
|
2020-05-01 11:05:56 +00:00
|
|
|
using osu.Game.Rulesets.Judgements;
|
2020-02-14 03:30:11 +00:00
|
|
|
using osu.Game.Rulesets.Objects;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Play
|
|
|
|
{
|
|
|
|
public class GameplayBeatmap : Component, IBeatmap
|
|
|
|
{
|
|
|
|
public readonly IBeatmap PlayableBeatmap;
|
|
|
|
|
|
|
|
public GameplayBeatmap(IBeatmap playableBeatmap)
|
|
|
|
{
|
|
|
|
PlayableBeatmap = playableBeatmap;
|
|
|
|
}
|
|
|
|
|
|
|
|
public BeatmapInfo BeatmapInfo
|
|
|
|
{
|
|
|
|
get => PlayableBeatmap.BeatmapInfo;
|
|
|
|
set => PlayableBeatmap.BeatmapInfo = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
public BeatmapMetadata Metadata => PlayableBeatmap.Metadata;
|
|
|
|
|
2021-01-15 08:34:01 +00:00
|
|
|
public ControlPointInfo ControlPointInfo
|
|
|
|
{
|
|
|
|
get => PlayableBeatmap.ControlPointInfo;
|
|
|
|
set => PlayableBeatmap.ControlPointInfo = value;
|
|
|
|
}
|
2020-02-14 03:30:11 +00:00
|
|
|
|
|
|
|
public List<BreakPeriod> Breaks => PlayableBeatmap.Breaks;
|
|
|
|
|
|
|
|
public double TotalBreakTime => PlayableBeatmap.TotalBreakTime;
|
|
|
|
|
|
|
|
public IReadOnlyList<HitObject> HitObjects => PlayableBeatmap.HitObjects;
|
|
|
|
|
|
|
|
public IEnumerable<BeatmapStatistic> GetStatistics() => PlayableBeatmap.GetStatistics();
|
|
|
|
|
2021-01-15 05:28:49 +00:00
|
|
|
public double GetMostCommonBeatLength() => PlayableBeatmap.GetMostCommonBeatLength();
|
|
|
|
|
2020-02-14 03:30:11 +00:00
|
|
|
public IBeatmap Clone() => PlayableBeatmap.Clone();
|
2020-05-01 11:05:56 +00:00
|
|
|
|
2020-05-03 14:55:44 +00:00
|
|
|
private readonly Bindable<JudgementResult> lastJudgementResult = new Bindable<JudgementResult>();
|
2020-05-01 11:05:56 +00:00
|
|
|
|
2020-05-03 14:55:44 +00:00
|
|
|
public IBindable<JudgementResult> LastJudgementResult => lastJudgementResult;
|
2020-05-01 11:05:56 +00:00
|
|
|
|
2020-05-03 14:55:44 +00:00
|
|
|
public void ApplyResult(JudgementResult result) => lastJudgementResult.Value = result;
|
2020-02-14 03:30:11 +00:00
|
|
|
}
|
|
|
|
}
|