本文整理汇总了C#中Lidgren.Network.NetIncomingMessage.ReadPoint方法的典型用法代码示例。如果您正苦于以下问题:C# NetIncomingMessage.ReadPoint方法的具体用法?C# NetIncomingMessage.ReadPoint怎么用?C# NetIncomingMessage.ReadPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lidgren.Network.NetIncomingMessage
的用法示例。
在下文中一共展示了NetIncomingMessage.ReadPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DataProcessing
private void DataProcessing(byte type, NetIncomingMessage message)
{
_counter++;
Debug.Print("[" + _counter + "]Message received from server !");
switch (type)
{
case (byte)MessageType.ServerMessage.ClientId:
Debug.Print("A message type 'ClientId' have been received from server !");
ReceiveMyClientId(message.ReadInt32());
break;
case (byte)MessageType.ServerMessage.NewClientInfo:
Debug.Print("A message type 'NewClientInfo' have been received from server !");
ReceiveNewClientInfo(message.ReadInt32(), message.ReadString(), message.ReadBoolean());
break;
case (byte)MessageType.ServerMessage.IsReady:
Debug.Print("A message type 'IsReady' have been received from server !");
ReceiveIsReady(message.ReadInt32(), message.ReadBoolean());
break;
case (byte)MessageType.ServerMessage.AvailableMaps:
Debug.Print("A message type 'AvailableMaps' have been received from server !");
ReceiveAvailableMaps(message);
break;
case (byte)MessageType.ServerMessage.SelectedMap:
Debug.Print("A message type 'SelectedMap' have been received from server !");
ReceiveSelectedMap(message.ReadString());
break;
case (byte)MessageType.ServerMessage.Map:
Debug.Print("A message type 'Map' have been received from server !");
ReceiveMap(message);
break;
case (byte)MessageType.ServerMessage.GameWillStart:
Debug.Print("A message type 'GameWillStart' have been received from server !");
ReceiveGameWillStart();
break;
case (byte)MessageType.ServerMessage.StartGame:
Debug.Print("A message type 'StartGame' have been received from server !");
ReceiveStartGame(message);
break;
case (byte)MessageType.ServerMessage.PlayerPosition:
Debug.Print("A message type 'PlayerPosition' have been received from server !");
ReceivePosition(message.ReadFloat(), message.ReadFloat(), message.ReadByte(), message.ReadInt32());
break;
case (byte)MessageType.ServerMessage.RemovePlayer:
Debug.Print("A message type 'RemovePlayer' have been received from server !");
ReceiveRemovePlayer(message.ReadInt32());
break;
case (byte)MessageType.ServerMessage.PlayerPlacingBomb:
Debug.Print("A message type 'PlayerPlacingBomb' have been received from server !");
ReceivePlacingBomb(message.ReadInt32(), message.ReadPoint());
break;
case (byte)MessageType.ServerMessage.BombExploded:
ReceiveBombExploded(message);
break;
case (byte)MessageType.ServerMessage.PlayerKill:
ReceivePlayerKill(message.ReadInt32(), message.ReadInt32());
break;
case (byte)MessageType.ServerMessage.PlayerSuicide:
ReceivePlayerSuicide(message.ReadInt32());
break;
case (byte)MessageType.ServerMessage.PowerUpDrop:
ReceivePowerupDrop((PowerUpType)message.ReadByte(), message.ReadPoint());
break;
case (byte)MessageType.ServerMessage.PowerUpPickUp:
ReceivePowerUpPickUp(message.ReadInt32(), message.ReadPoint(), (PowerUpType)message.ReadByte());
break;
case (byte)MessageType.ServerMessage.SuddenDeath:
//ReceiveSuddenDeath();
break;
case (byte)MessageType.ServerMessage.RoundEnd:
Debug.Print("A message type 'RoundEnd' have been received from server !");
ReceiveRoundEnd();
break;
case (byte)MessageType.ServerMessage.End:
Debug.Print("A message type 'End' have been received from server !");
ReceiveEnd(message.ReadBoolean());
break;
case (byte)MessageType.ServerMessage.Pings:
//Debug.Print("A message type 'Pings have been received from server !");
ReceivePings(message);
break;
}
}