1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 08:52:54 +08:00
osu-lazer/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPlayerLoader.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
735 B
C#
Raw Normal View History

// 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
{
public bool GameplayPassed => player?.GameplayState.HasPassed == true;
private Player player;
public MultiplayerPlayerLoader(Func<Player> createPlayer)
: base(createPlayer)
{
}
public override void OnSuspending(ScreenTransitionEvent e)
{
base.OnSuspending(e);
player = (Player)e.Next;
}
}
}