mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08:00
Make DuckDuration
non-zero by default
This commit is contained in:
parent
7efb4ce30a
commit
5907e0d1eb
@ -13,10 +13,7 @@ namespace osu.Game.Tests.Visual.Menus
|
||||
[Test]
|
||||
public void TestMomentaryDuck()
|
||||
{
|
||||
AddStep("duck momentarily", () => Game.MusicController.DuckMomentarily(1000, new DuckParameters
|
||||
{
|
||||
DuckDuration = 300,
|
||||
}));
|
||||
AddStep("duck momentarily", () => Game.MusicController.DuckMomentarily(1000));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -127,8 +127,8 @@ namespace osu.Game.Collections
|
||||
{
|
||||
duckOperation = musicController?.Duck(new DuckParameters
|
||||
{
|
||||
DuckDuration = 100,
|
||||
DuckVolumeTo = 1,
|
||||
DuckDuration = 100,
|
||||
RestoreDuration = 100,
|
||||
});
|
||||
|
||||
|
@ -108,8 +108,8 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
duckOperation = musicController?.Duck(new DuckParameters
|
||||
{
|
||||
DuckDuration = 100,
|
||||
DuckVolumeTo = 1,
|
||||
DuckDuration = 100,
|
||||
RestoreDuration = 100,
|
||||
});
|
||||
}
|
||||
|
@ -486,9 +486,9 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
/// <summary>
|
||||
/// The duration of the ducking transition in milliseconds.
|
||||
/// Defaults to no duration (immediate ducking).
|
||||
/// Defaults to 100 ms.
|
||||
/// </summary>
|
||||
public double DuckDuration = 0;
|
||||
public double DuckDuration = 100;
|
||||
|
||||
/// <summary>
|
||||
/// The final volume which should be reached during ducking, when 0 is silent and 1 is original volume.
|
||||
|
@ -122,7 +122,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
|
||||
rulesetSelectionChannel[r.NewValue] = channel;
|
||||
channel.Play();
|
||||
musicController?.DuckMomentarily(500);
|
||||
musicController?.DuckMomentarily(500, new DuckParameters { DuckDuration = 0 });
|
||||
}
|
||||
|
||||
public override bool HandleNonPositionalInput => !Current.Disabled && base.HandleNonPositionalInput;
|
||||
|
Loading…
Reference in New Issue
Block a user