コード例 #1
0
 public void SendSetShipSubPacket(int selectedShip)
 {
     if (IsConnectedToServer && connections.Count == 1)
     {
         Send(SetShipSubPacket.GetPackage(selectedShip));
     }
     else
     {
         throw new InvalidOperationException("Connection ID MUST be specified.");
     }
 }
コード例 #2
0
 /// <summary>
 /// Sends the set ship sub packet.
 /// </summary>
 /// <param name="connectionID">The connection identifier.</param>
 /// <param name="selectedShip">The selected ship. (1-based)</param>
 public void SendSetShipSubPacket(Guid connectionID, int selectedShip)
 {
     Send(connectionID, SetShipSubPacket.GetPackage(selectedShip));
 }