mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:52:55 +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]
|
[Test]
|
||||||
public void TestMomentaryDuck()
|
public void TestMomentaryDuck()
|
||||||
{
|
{
|
||||||
AddStep("duck momentarily", () => Game.MusicController.DuckMomentarily(1000, new DuckParameters
|
AddStep("duck momentarily", () => Game.MusicController.DuckMomentarily(1000));
|
||||||
{
|
|
||||||
DuckDuration = 300,
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -127,8 +127,8 @@ namespace osu.Game.Collections
|
|||||||
{
|
{
|
||||||
duckOperation = musicController?.Duck(new DuckParameters
|
duckOperation = musicController?.Duck(new DuckParameters
|
||||||
{
|
{
|
||||||
DuckDuration = 100,
|
|
||||||
DuckVolumeTo = 1,
|
DuckVolumeTo = 1,
|
||||||
|
DuckDuration = 100,
|
||||||
RestoreDuration = 100,
|
RestoreDuration = 100,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -108,8 +108,8 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
duckOperation = musicController?.Duck(new DuckParameters
|
duckOperation = musicController?.Duck(new DuckParameters
|
||||||
{
|
{
|
||||||
DuckDuration = 100,
|
|
||||||
DuckVolumeTo = 1,
|
DuckVolumeTo = 1,
|
||||||
|
DuckDuration = 100,
|
||||||
RestoreDuration = 100,
|
RestoreDuration = 100,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -486,9 +486,9 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The duration of the ducking transition in milliseconds.
|
/// The duration of the ducking transition in milliseconds.
|
||||||
/// Defaults to no duration (immediate ducking).
|
/// Defaults to 100 ms.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double DuckDuration = 0;
|
public double DuckDuration = 100;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The final volume which should be reached during ducking, when 0 is silent and 1 is original volume.
|
/// 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;
|
rulesetSelectionChannel[r.NewValue] = channel;
|
||||||
channel.Play();
|
channel.Play();
|
||||||
musicController?.DuckMomentarily(500);
|
musicController?.DuckMomentarily(500, new DuckParameters { DuckDuration = 0 });
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool HandleNonPositionalInput => !Current.Disabled && base.HandleNonPositionalInput;
|
public override bool HandleNonPositionalInput => !Current.Disabled && base.HandleNonPositionalInput;
|
||||||
|
Loading…
Reference in New Issue
Block a user