2021-12-24 05:23:09 +00:00
|
|
|
// 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 osu.Framework.Screens;
|
|
|
|
using osu.Game.Screens.Play;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|
|
|
{
|
|
|
|
public class MultiplayerPlayerLoader : PlayerLoader
|
|
|
|
{
|
2022-01-25 16:45:11 +00:00
|
|
|
public bool GameplayPassed => player?.GameplayState.HasPassed == true;
|
2021-12-24 05:23:09 +00:00
|
|
|
|
|
|
|
private Player player;
|
|
|
|
|
|
|
|
public MultiplayerPlayerLoader(Func<Player> createPlayer)
|
|
|
|
: base(createPlayer)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void OnSuspending(IScreen next)
|
|
|
|
{
|
|
|
|
base.OnSuspending(next);
|
|
|
|
player = (Player)next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|