Added PlaysSamples property to prevent certain DrawableHitObjects from playing their samples on hit. Also added this to TaikoObjects so their hitsounds won't be played (will be done by the TaikoRulesetContainer)

This commit is contained in:
FreezyLemon 2017-11-29 06:24:13 +01:00
parent f54cbc2b2f
commit bc3f11fdb8
2 changed files with 6 additions and 1 deletions

View File

@ -14,6 +14,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
{
public override Vector2 OriginPosition => new Vector2(DrawHeight / 2);
protected override bool PlaysSamples => false;
protected readonly Vector2 BaseSize;
protected readonly TaikoPiece MainPiece;

View File

@ -59,6 +59,9 @@ namespace osu.Game.Rulesets.Objects.Drawables
private readonly List<Judgement> judgements = new List<Judgement>();
public IReadOnlyList<Judgement> Judgements => judgements;
// Override in inheriting classes to prevent from playing samples on hit
protected virtual bool PlaysSamples => true;
protected List<SampleChannel> Samples = new List<SampleChannel>();
public readonly Bindable<ArmedState> State = new Bindable<ArmedState>();
@ -92,7 +95,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
{
UpdateState(state);
if (State == ArmedState.Hit)
if (State == ArmedState.Hit && PlaysSamples)
PlaySamples();
};