mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:35:35 +08:00
Add sound effect to osu! logo clicking.
This commit is contained in:
parent
24ba21363e
commit
8a0887c3c3
@ -4,6 +4,8 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Sample;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -32,6 +34,8 @@ namespace osu.Game.Screens.Menu
|
||||
private Container logoHoverContainer;
|
||||
private MenuVisualisation vis;
|
||||
|
||||
private AudioSample sampleClick;
|
||||
|
||||
private Container colourAndTriangles;
|
||||
|
||||
public Action Action;
|
||||
@ -166,8 +170,9 @@ namespace osu.Game.Screens.Menu
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
private void load(TextureStore textures, AudioManager audio)
|
||||
{
|
||||
sampleClick = audio.Sample.Get(@"Menu/menuhit");
|
||||
logo.Texture = textures.Get(@"Menu/logo");
|
||||
ripple.Texture = textures.Get(@"Menu/logo");
|
||||
}
|
||||
@ -200,6 +205,8 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
if (!Interactive) return false;
|
||||
|
||||
sampleClick.Play();
|
||||
|
||||
flashLayer.ClearTransformations();
|
||||
flashLayer.Alpha = 0.4f;
|
||||
flashLayer.FadeOut(1500, EasingTypes.OutExpo);
|
||||
|
Loading…
Reference in New Issue
Block a user