mirror of
https://github.com/osukey/osukey.git
synced 2025-06-27 22:27:57 +09:00
Gray out and remove player clock when users stop playing
This commit is contained in:
parent
599145b46a
commit
196c74fce8
@ -8,6 +8,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Spectator;
|
using osu.Game.Online.Spectator;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
@ -32,6 +33,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool AllPlayersLoaded => instances.All(p => p?.PlayerLoaded == true);
|
public bool AllPlayersLoaded => instances.All(p => p?.PlayerLoaded == true);
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private OsuColour colours { get; set; }
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private SpectatorClient spectatorClient { get; set; }
|
private SpectatorClient spectatorClient { get; set; }
|
||||||
|
|
||||||
@ -215,6 +219,11 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
protected override void EndGameplay(int userId)
|
protected override void EndGameplay(int userId)
|
||||||
{
|
{
|
||||||
RemoveUser(userId);
|
RemoveUser(userId);
|
||||||
|
|
||||||
|
var instance = instances.Single(i => i.UserId == userId);
|
||||||
|
|
||||||
|
instance.FadeColour(colours.Gray4, 400, Easing.OutQuint);
|
||||||
|
syncManager.RemovePlayerClock(instance.GameplayClock);
|
||||||
leaderboard.RemoveClock(userId);
|
leaderboard.RemoveClock(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user