mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Merge branch 'master' into mania-notes
This commit is contained in:
@ -11,6 +11,7 @@ using Container = osu.Framework.Graphics.Containers.Container;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Game.Audio;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Rulesets.Objects.Drawables
|
||||
{
|
||||
@ -33,6 +34,11 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
|
||||
public TJudgement Judgement;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this hit object has been judged.
|
||||
/// </summary>
|
||||
public virtual bool Judged => (Judgement?.Result ?? HitResult.None) != HitResult.None;
|
||||
|
||||
protected abstract TJudgement CreateJudgement();
|
||||
|
||||
protected abstract void UpdateState(ArmedState state);
|
||||
@ -73,6 +79,11 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
UpdateState(State);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether this hit object and all of its nested hit objects have been judged.
|
||||
/// </summary>
|
||||
public sealed override bool Judged => base.Judged && (NestedHitObjects?.All(h => h.Judged) ?? true);
|
||||
|
||||
protected DrawableHitObject(TObject hitObject)
|
||||
{
|
||||
HitObject = hitObject;
|
||||
@ -84,7 +95,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
/// <returns>Whether a hit was processed.</returns>
|
||||
protected bool UpdateJudgement(bool userTriggered)
|
||||
{
|
||||
IPartialJudgement partial = Judgement as IPartialJudgement;
|
||||
var partial = Judgement as IPartialJudgement;
|
||||
|
||||
// Never re-process non-partial hits
|
||||
if (Judgement.Result != HitResult.None && partial == null)
|
||||
@ -160,7 +171,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
}
|
||||
|
||||
private List<DrawableHitObject<TObject, TJudgement>> nestedHitObjects;
|
||||
|
||||
protected IEnumerable<DrawableHitObject<TObject, TJudgement>> NestedHitObjects => nestedHitObjects;
|
||||
|
||||
protected void AddNested(DrawableHitObject<TObject, TJudgement> h)
|
||||
|
Reference in New Issue
Block a user