Files
Ragon/Ragon.Core/PlayerContext.cs
T
2022-12-16 00:05:46 +04:00

28 lines
624 B
C#

using NLog;
using Ragon.Core.Game;
using Ragon.Core.Lobby;
using Ragon.Core.Time;
using Ragon.Server;
namespace Ragon.Core;
public class PlayerContext: IDisposable
{
public INetworkConnection Connection { get; }
public Scheduler Scheduler;
public ILobby Lobby { get; set; }
public LobbyPlayer LobbyPlayer { private set; get; }
public Room? Room { get; set; }
public RoomPlayer? RoomPlayer { get; set; }
public PlayerContext(INetworkConnection conn, LobbyPlayer player)
{
Connection = conn;
LobbyPlayer = player;
}
public void Dispose()
{
RoomPlayer?.Room.RemovePlayer(RoomPlayer);
}
}