mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 20:53:00 +08:00
commit
987e931baa
@ -185,8 +185,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
private void load(AudioManager audio)
|
private void load(AudioManager audio)
|
||||||
{
|
{
|
||||||
sampleHover = audio.Samples.Get(@"Menu/button-hover");
|
sampleHover = audio.Samples.Get(@"Menu/button-hover");
|
||||||
if (!string.IsNullOrEmpty(sampleName))
|
sampleClick = audio.Samples.Get(!string.IsNullOrEmpty(sampleName) ? $@"Menu/{sampleName}" : @"UI/button-select");
|
||||||
sampleClick = audio.Samples.Get($@"Menu/{sampleName}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseDown(MouseDownEvent e)
|
protected override bool OnMouseDown(MouseDownEvent e)
|
||||||
|
@ -283,9 +283,15 @@ namespace osu.Game.Screens.Menu
|
|||||||
this.Delay(early_activation).Schedule(() =>
|
this.Delay(early_activation).Schedule(() =>
|
||||||
{
|
{
|
||||||
if (beatIndex % timingPoint.TimeSignature.Numerator == 0)
|
if (beatIndex % timingPoint.TimeSignature.Numerator == 0)
|
||||||
sampleDownbeat.Play();
|
{
|
||||||
|
sampleDownbeat?.Play();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
sampleBeat.Play();
|
{
|
||||||
|
var channel = sampleBeat.GetChannel();
|
||||||
|
channel.Frequency.Value = 0.95 + RNG.NextDouble(0.1);
|
||||||
|
channel.Play();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user