mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Convert interface methods to extension methods
This commit is contained in:
18
osu.Game/Beatmaps/BeatSyncProviderExtensions.cs
Normal file
18
osu.Game/Beatmaps/BeatSyncProviderExtensions.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.
|
||||
|
||||
namespace osu.Game.Beatmaps
|
||||
{
|
||||
public static class BeatSyncProviderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Check whether beat sync is currently available.
|
||||
/// </summary>
|
||||
public static bool CheckBeatSyncAvailable(this IBeatSyncProvider provider) => provider.Clock != null;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the beat sync provider is currently in a kiai section. Should make everything more epic.
|
||||
/// </summary>
|
||||
public static bool CheckIsKiaiTime(this IBeatSyncProvider provider) => provider.Clock != null && (provider.ControlPoints?.EffectPointAt(provider.Clock.CurrentTime).KiaiMode ?? false);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user