// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using osu.Framework.Bindables; using osu.Game.Beatmaps; using osu.Game.Rulesets; using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Mods; using osu.Game.Scoring; #nullable enable namespace osu.Game.Screens.Play { /// /// The state of an active gameplay session, generally constructed and exposed by . /// public class GameplayState { /// /// The final post-convert post-mod-application beatmap. /// public readonly IBeatmap Beatmap; /// /// The ruleset used in gameplay. /// public readonly Ruleset Ruleset; /// /// The mods applied to the gameplay. /// public readonly IReadOnlyList Mods; /// /// The gameplay score. /// public Score? Score { get; set; } /// /// A bindable tracking the last judgement result applied to any hit object. /// public IBindable LastJudgementResult => lastJudgementResult; private readonly Bindable lastJudgementResult = new Bindable(); public GameplayState(IBeatmap beatmap, Ruleset ruleset, IReadOnlyList mods) { Beatmap = beatmap; Ruleset = ruleset; Mods = mods; } /// /// Applies the score change of a to this . /// /// The to apply. public void ApplyResult(JudgementResult result) => lastJudgementResult.Value = result; } }