mirror of
https://github.com/osukey/osukey.git
synced 2025-05-24 15:07:20 +09: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;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Audio;
|
||||||
|
using osu.Framework.Audio.Sample;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Colour;
|
using osu.Framework.Graphics.Colour;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -32,6 +34,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
private Container logoHoverContainer;
|
private Container logoHoverContainer;
|
||||||
private MenuVisualisation vis;
|
private MenuVisualisation vis;
|
||||||
|
|
||||||
|
private AudioSample sampleClick;
|
||||||
|
|
||||||
private Container colourAndTriangles;
|
private Container colourAndTriangles;
|
||||||
|
|
||||||
public Action Action;
|
public Action Action;
|
||||||
@ -166,8 +170,9 @@ namespace osu.Game.Screens.Menu
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[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");
|
logo.Texture = textures.Get(@"Menu/logo");
|
||||||
ripple.Texture = textures.Get(@"Menu/logo");
|
ripple.Texture = textures.Get(@"Menu/logo");
|
||||||
}
|
}
|
||||||
@ -200,6 +205,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
if (!Interactive) return false;
|
if (!Interactive) return false;
|
||||||
|
|
||||||
|
sampleClick.Play();
|
||||||
|
|
||||||
flashLayer.ClearTransformations();
|
flashLayer.ClearTransformations();
|
||||||
flashLayer.Alpha = 0.4f;
|
flashLayer.Alpha = 0.4f;
|
||||||
flashLayer.FadeOut(1500, EasingTypes.OutExpo);
|
flashLayer.FadeOut(1500, EasingTypes.OutExpo);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user