1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-06 05:33:22 +08:00

Add sound back to skip action

This commit is contained in:
Dean Herbert 2017-05-19 22:23:48 +09:00
parent 60f960aafd
commit 674731f9bb

View File

@ -4,6 +4,7 @@
using System; using System;
using osu.Framework; using osu.Framework;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
@ -16,6 +17,7 @@ using osu.Game.Screens.Ranking;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using OpenTK.Input; using OpenTK.Input;
using osu.Framework.Audio.Sample;
namespace osu.Game.Screens.Play namespace osu.Game.Screens.Play
{ {
@ -184,6 +186,7 @@ namespace osu.Game.Screens.Play
private FillFlowContainer flow; private FillFlowContainer flow;
private Box background; private Box background;
private AspectContainer aspect; private AspectContainer aspect;
private SampleChannel activationSound;
public Button() public Button()
{ {
@ -191,8 +194,10 @@ namespace osu.Game.Screens.Play
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuColour colours) private void load(OsuColour colours, AudioManager audio)
{ {
activationSound = audio.Sample.Get(@"Menu/menuhit");
colourNormal = colours.Yellow; colourNormal = colours.Yellow;
colourHover = colours.YellowDark; colourHover = colours.YellowDark;
@ -281,6 +286,8 @@ namespace osu.Game.Screens.Play
{ {
Action?.Invoke(); Action?.Invoke();
activationSound.Play();
box.FlashColour(Color4.White, 500, EasingTypes.OutQuint); box.FlashColour(Color4.White, 500, EasingTypes.OutQuint);
aspect.ScaleTo(1.2f, 2000, EasingTypes.OutQuint); aspect.ScaleTo(1.2f, 2000, EasingTypes.OutQuint);
return true; return true;