Пример #1
0
 /// <summary>
 /// Sends a keep-alive message to the game server. This is non-blocking.
 /// </summary>
 public void SendKeepAlive()
 {
     Debug.Log($"Sending keep alive...");
     SendCore(PacketFactory.MakeKeepAliveBuffer());
 }
Пример #2
0
 /// <summary>
 /// Tells the game server that the player is ending the match. This is non-blocking.
 /// </summary>
 public void QuitMatch()
 {
     Debug.Log($"Sending Abort match packet");
     SendCore(PacketFactory.MakeAbortBuffer());
 }
Пример #3
0
 /// <summary>
 /// Sends the player's world position to the game server. This is non-blocking.
 /// </summary>
 /// <param name="touchWorldPos"></param>
 public void SendPlayerPosition(Vector2 touchWorldPos)
 {
     Debug.Log($"Sending player position=({touchWorldPos.x}, {touchWorldPos.y})");
     SendCore(PacketFactory.MakePlayerUpdatedBuffer(touchWorldPos));
 }