internal void VerifyPlayerConnecting(Player player, Guid token) { if (_waitingTokens.TryGetValue(token, out var wait)) { wait.Player = player; } else { _waitingTokens[token] = new WaitingToken { Player = player }; } }
private void VerifyPlayerConnecting(Player player, Guid token) { WaitingToken wait; if (_waitingTokens.TryGetValue(token, out wait)) { wait.Player = player; } else { _waitingTokens[token] = new WaitingToken { Player = player }; } }
internal void PlayerWillConnect(NetMessage msg) { if (!msg.ReadGuid(out var guid)) { Debug.LogError("Got a message for expecting a player, but no token was sent"); return; } var id = msg.ReadUInt16(); if (_waitingTokens.TryGetValue(guid, out var wait)) { wait.Id = id; } else { _waitingTokens[guid] = new WaitingToken { Id = id }; } }