WutheringWaves/GameServer/Models/ModelManager.cs

13 lines
362 B
C#
Raw Normal View History

2024-02-09 09:20:14 +00:00
namespace GameServer.Models;
internal class ModelManager
{
private PlayerModel? _playerModel;
public void OnLogin()
{
_playerModel = PlayerModel.CreateDefaultPlayer();
}
public PlayerModel Player => _playerModel ?? throw new InvalidOperationException($"Trying to access {nameof(PlayerModel)} instance before initialization!");
}