mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Merge pull request #17699 from nekodex/mp-countdown-sfx-2
Add MP lobby 'warning' SFX for the final seconds of countdown
This commit is contained in:
@ -51,7 +51,7 @@
|
||||
<Reference Include="Java.Interop" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.405.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.407.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2022.405.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="Transitive Dependencies">
|
||||
|
@ -30,13 +30,15 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
private MultiplayerRoom room => multiplayerClient.Room;
|
||||
|
||||
private Sample countdownTickSample;
|
||||
private Sample countdownWarnSample;
|
||||
private Sample countdownWarnFinalSample;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio)
|
||||
{
|
||||
countdownTickSample = audio.Samples.Get(@"Multiplayer/countdown-tick");
|
||||
// disabled for now pending further work on sound effect
|
||||
// countdownTickFinalSample = audio.Samples.Get(@"Multiplayer/countdown-tick-final");
|
||||
countdownWarnSample = audio.Samples.Get(@"Multiplayer/countdown-warn");
|
||||
countdownWarnFinalSample = audio.Samples.Get(@"Multiplayer/countdown-warn-final");
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
@ -102,8 +104,14 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
private void playTickSound(int secondsRemaining)
|
||||
{
|
||||
if (secondsRemaining < 10) countdownTickSample?.Play();
|
||||
// disabled for now pending further work on sound effect
|
||||
// if (secondsRemaining <= 3) countdownTickFinalSample?.Play();
|
||||
|
||||
if (secondsRemaining <= 3)
|
||||
{
|
||||
if (secondsRemaining > 0)
|
||||
countdownWarnSample?.Play();
|
||||
else
|
||||
countdownWarnFinalSample?.Play();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateButtonText()
|
||||
|
@ -36,7 +36,7 @@
|
||||
</PackageReference>
|
||||
<PackageReference Include="Realm" Version="10.10.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2022.405.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.405.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.407.0" />
|
||||
<PackageReference Include="Sentry" Version="3.14.1" />
|
||||
<PackageReference Include="SharpCompress" Version="0.30.1" />
|
||||
<PackageReference Include="NUnit" Version="3.13.2" />
|
||||
|
@ -62,7 +62,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="Package References">
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2022.405.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.405.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.407.0" />
|
||||
</ItemGroup>
|
||||
<!-- See https://github.com/dotnet/runtime/issues/35988 (can be removed after Xamarin uses net6.0) -->
|
||||
<PropertyGroup>
|
||||
|
Reference in New Issue
Block a user