1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 05:27:23 +08:00

Add null check and xmldoc

This commit is contained in:
Dean Herbert 2020-06-18 23:52:35 +09:00
parent add1265d53
commit 7da56ec7fd

View File

@ -1,6 +1,8 @@
// 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 System;
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
@ -8,7 +10,10 @@ using osu.Framework.Platform;
namespace osu.Game.Screens.Play
{
internal class ScreenSuspensionHandler : Component
/// <summary>
/// Ensures screen is not suspended / dimmed while gameplay is active.
/// </summary>
public class ScreenSuspensionHandler : Component
{
private readonly GameplayClockContainer gameplayClockContainer;
private Bindable<bool> isPaused;
@ -16,9 +21,9 @@ namespace osu.Game.Screens.Play
[Resolved]
private GameHost host { get; set; }
public ScreenSuspensionHandler(GameplayClockContainer gameplayClockContainer)
public ScreenSuspensionHandler([NotNull] GameplayClockContainer gameplayClockContainer)
{
this.gameplayClockContainer = gameplayClockContainer;
this.gameplayClockContainer = gameplayClockContainer ?? throw new ArgumentNullException(nameof(gameplayClockContainer));
}
protected override void LoadComplete()