1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 03:25:11 +08:00

Implement IApplicableToHUD

This commit is contained in:
iiSaLMaN 2019-06-29 04:23:59 +03:00 committed by KingLuigi4932
parent 7762b67ecb
commit d37cefbad8
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,18 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Screens.Play;
namespace osu.Game.Rulesets.Mods
{
/// <summary>
/// An interface for mods that apply changes to the <see cref="HUDOverlay"/>.
/// </summary>
public interface IApplicableToHUD : IApplicableMod
{
/// <summary>
/// Provide a <see cref="HUDOverlay"/>. Called once on initialisation of a play instance.
/// </summary>
void ApplyToHUD(HUDOverlay overlay);
}
}

View File

@ -494,6 +494,9 @@ namespace osu.Game.Screens.Play
GameplayClockContainer.Restart();
GameplayClockContainer.FadeInFromZero(750, Easing.OutQuint);
foreach (var mod in Mods.Value.OfType<IApplicableToHUD>())
mod.ApplyToHUD(HUDOverlay);
}
public override void OnSuspending(IScreen next)