Add a bool to specify whether judgements should be visible for certain DrawableHitObjects

This commit is contained in:
Dean Herbert 2017-10-09 20:17:05 +09:00
parent b1a2da58bc
commit d5892cf54e
5 changed files with 13 additions and 1 deletions

View File

@ -22,6 +22,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
public override bool RemoveWhenNotAlive => false;
public override bool DisplayJudgement => false;
public DrawableSliderTick(SliderTick sliderTick) : base(sliderTick)
{
this.sliderTick = sliderTick;

View File

@ -91,6 +91,9 @@ namespace osu.Game.Rulesets.Osu.UI
var osuJudgement = (OsuJudgement)judgement;
var osuObject = (OsuHitObject)judgedObject.HitObject;
if (!judgedObject.DisplayJudgement)
return;
DrawableOsuJudgement explosion = new DrawableOsuJudgement(osuJudgement)
{
Origin = Anchor.Centre,

View File

@ -21,6 +21,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
FillMode = FillMode.Fit;
}
public override bool DisplayJudgement => false;
protected override void LoadComplete()
{
base.LoadComplete();

View File

@ -221,7 +221,7 @@ namespace osu.Game.Rulesets.Taiko.UI
public override void OnJudgement(DrawableHitObject judgedObject, Judgement judgement)
{
if (judgementContainer.FirstOrDefault(j => j.JudgedObject == judgedObject) == null)
if (judgedObject.DisplayJudgement && judgementContainer.FirstOrDefault(j => j.JudgedObject == judgedObject) == null)
{
judgementContainer.Add(new DrawableTaikoJudgement(judgedObject, judgement)
{

View File

@ -25,6 +25,11 @@ namespace osu.Game.Rulesets.Objects.Drawables
/// </summary>
public virtual Color4 AccentColour { get; set; } = Color4.Gray;
/// <summary>
/// Whether a visible judgement should be displayed when this representation is hit.
/// </summary>
public virtual bool DisplayJudgement => true;
protected DrawableHitObject(HitObject hitObject)
{
HitObject = hitObject;