mirror of
https://github.com/osukey/osukey.git
synced 2025-05-28 08:57:25 +09:00
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:
parent
f54cbc2b2f
commit
bc3f11fdb8
@ -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;
|
||||
|
@ -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();
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user