mirror of
https://github.com/ppy/osu.git
synced 2024-09-22 19:27:31 +08:00
Merge pull request #956 from EVAST9919/heartbeat
Add heartbeat sound effect when hovering osu! logo
This commit is contained in:
commit
722e519e0f
@ -38,6 +38,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
private readonly LogoVisualisation visualizer;
|
private readonly LogoVisualisation visualizer;
|
||||||
|
|
||||||
private SampleChannel sampleClick;
|
private SampleChannel sampleClick;
|
||||||
|
private SampleChannel sampleBeat;
|
||||||
|
|
||||||
private readonly Container colourAndTriangles;
|
private readonly Container colourAndTriangles;
|
||||||
|
|
||||||
@ -215,6 +216,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
private void load(TextureStore textures, AudioManager audio)
|
private void load(TextureStore textures, AudioManager audio)
|
||||||
{
|
{
|
||||||
sampleClick = audio.Sample.Get(@"Menu/menuhit");
|
sampleClick = audio.Sample.Get(@"Menu/menuhit");
|
||||||
|
sampleBeat = audio.Sample.Get(@"Menu/heartbeat");
|
||||||
logo.Texture = textures.Get(@"Menu/logo");
|
logo.Texture = textures.Get(@"Menu/logo");
|
||||||
ripple.Texture = textures.Get(@"Menu/logo");
|
ripple.Texture = textures.Get(@"Menu/logo");
|
||||||
}
|
}
|
||||||
@ -225,6 +227,9 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes);
|
base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes);
|
||||||
|
|
||||||
|
if (Hovering)
|
||||||
|
sampleBeat.Play();
|
||||||
|
|
||||||
lastBeatIndex = beatIndex;
|
lastBeatIndex = beatIndex;
|
||||||
|
|
||||||
var beatLength = timingPoint.BeatLength;
|
var beatLength = timingPoint.BeatLength;
|
||||||
|
Loading…
Reference in New Issue
Block a user