/// <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()); }
/// <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()); }
/// <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)); }