private void WaitForConnection() { while (!SplashKit.HasNewConnections()) { SplashKit.AcceptAllNewConnections(); } ThisPeer.CheckNewConnections(); }
public void UpdateNetworkInfo() { if (IsServer) { SplashKit.AcceptAllNewConnections(); } _otherPlayerMsg = ThisPeer.GetNewMessages(); UpdateOtherPlayer(); BroadcastMessage(); }
public void UpdateNetworkInfo() { if (IsServer) { SplashKit.AcceptAllNewConnections(); } // ThisPeer.PrintNewMessages(); _otherPlayerMsg = ThisPeer.GetNewMessages(); UpdateOtherPlayer(); //Console.WriteLine(ThisPeer.GetNewMessages()); BroadcastMessage(); }
private void BroadcastMessage() { ThisPeer.Broadcast($"{_player.Name},{_player.X},{_player.Y},{_player.Radius}"); }