1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Add more prominent sound when skipping

This commit is contained in:
Dean Herbert 2018-07-22 22:57:55 +02:00
parent 9f1d37e052
commit 479fe98335

View File

@ -4,6 +4,8 @@
using System;
using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Threading;
@ -214,17 +216,21 @@ namespace osu.Game.Screens.Play
private Box background;
private AspectContainer aspect;
private SampleChannel sampleConfirm;
public Button()
{
RelativeSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
private void load(OsuColour colours, AudioManager audio)
{
colourNormal = colours.Yellow;
colourHover = colours.YellowDark;
sampleConfirm = audio.Sample.Get(@"SongSelect/confirm-selection");
Children = new Drawable[]
{
background = new Box
@ -311,6 +317,8 @@ namespace osu.Game.Screens.Play
if (!Enabled)
return false;
sampleConfirm.Play();
box.FlashColour(Color4.White, 500, Easing.OutQuint);
aspect.ScaleTo(1.2f, 2000, Easing.OutQuint);