mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 03:25:11 +08:00
Implement IApplicableToHUD
This commit is contained in:
parent
7762b67ecb
commit
d37cefbad8
18
osu.Game/Rulesets/Mods/IApplicableToHUD.cs
Normal file
18
osu.Game/Rulesets/Mods/IApplicableToHUD.cs
Normal 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);
|
||||
}
|
||||
}
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user