internal Player(PlayerType playerType, SessionSettings settings) { _settings = settings; PlayerHandle = new PlayerHandle(Guid.NewGuid().GetHashCode(), playerType); _savedStates = new RingBuffer <InputState>(_settings.RollbackWindow); LastConfirmedStep = Constants.NULL_STEP; _lastAddedStep = Constants.NULL_STEP; }
private Player <TInputState> GetPlayer(PlayerHandle playerHandle) { foreach (var player in _players) { if (player.PlayerHandle == playerHandle) { return(player); } } Debug.Assert(false, "Could not get Player from PlayerHandle"); return(default);