本文整理汇总了C#中Lidgren.Network.NetOutgoingMessage.Write方法的典型用法代码示例。如果您正苦于以下问题:C# NetOutgoingMessage.Write方法的具体用法?C# NetOutgoingMessage.Write怎么用?C# NetOutgoingMessage.Write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lidgren.Network.NetOutgoingMessage
的用法示例。
在下文中一共展示了NetOutgoingMessage.Write方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToNetMsg
public static void ToNetMsg(string sender, string group, string message, ref NetOutgoingMessage netMsg)
{
netMsg.Write((byte)NetDataType.eDATA_GROUP_MSG);
netMsg.Write(sender);
netMsg.Write(group);
netMsg.Write(message);
}
示例2: Write
public void Write(NetOutgoingMessage packet)
{
packet.Write(this.Slot);
packet.Write((Byte)this.Team);
packet.Write(this.Callsign);
packet.Write(this.Tag);
}
示例3: Write
internal override void Write(NetOutgoingMessage Message)
{
base.Write(Message);
Message.Write(Language.ToString());
Message.Write(Location.ToString());
Message.Write(Source);
}
示例4: ToNetMsg
public static void ToNetMsg(long serverUUID, IPEndPoint clientInternal, string token, ref NetOutgoingMessage netMsg)
{
netMsg.Write((byte)NetDataType.eDATA_REQUEST_INTRODUCTION);
netMsg.Write(serverUUID);
netMsg.Write(clientInternal);
netMsg.Write(token);
}
示例5: Encode
public override void Encode(NetOutgoingMessage msg)
{
msg.Write(findSixes);
msg.Write((byte)nPosition.Count);
foreach (byte p in nPosition)
msg.Write(p);
}
示例6: Write
public void Write(NetOutgoingMessage packet)
{
packet.Write(Slot);
packet.Write((Byte)Team);
packet.Write(Callsign);
packet.Write(Tag);
}
示例7: SendBlockSet
public void SendBlockSet(BlockTypes type,Vector3 pos)
{
_outmsg = _client.CreateMessage();
_outmsg.Write((byte)PacketType.PlayerBlockSet);
_outmsg.Write(pos);
_outmsg.Write((byte)type);
}
示例8: WriteToMessage
public void WriteToMessage(NetOutgoingMessage message)
{
message.Write(SessionID);
message.Write(ID);
message.Write(IsValid);
message.Write(PlayerIndex);
}
开发者ID:elefantstudio-se,项目名称:xna-lidgren-multiplayer-game,代码行数:7,代码来源:ClientDisconnectedTransferableData.cs
示例9: W
public void W(NetOutgoingMessage om)
{
om.Write(Uid);
om.Write(X);
om.Write(Y);
om.Write(SpriteId);
}
示例10: Encode
public void Encode(NetOutgoingMessage om)
{
om.Write(Shots);
om.Write(Hits);
om.Write(Misses);
om.Write(ShipsKilled);
}
示例11: Write
protected override void Write(NetOutgoingMessage message)
{
message.Write(body.Position.X * Constants.PixelsPerMeter);
message.Write(body.Position.Y * Constants.PixelsPerMeter);
message.Write(body.Rotation.ToNetworkRotation());
message.Write(type);
}
示例12: SendMovementUpdate
public void SendMovementUpdate()
{
_outmsg = _client.CreateMessage();
_outmsg.Write((byte)PacketType.PlayerMovementUpdate);
_outmsg.Write(_pbag.Player.Position);
_client.SendMessage(_outmsg, NetDeliveryMethod.ReliableOrdered);
}
示例13: SendPlayerInWorld
public void SendPlayerInWorld()
{
_outmsg = _client.CreateMessage();
_outmsg.Write((byte)PacketType.PlayerInWorld);
_outmsg.Write(true);
_client.SendMessage(_outmsg, NetDeliveryMethod.ReliableOrdered);
}
示例14: SendCurrentWorld
public void SendCurrentWorld(ServerPlayer player)
{
_outmsg = _netserver.CreateMessage();
_outmsg.Write((byte)PacketType.WorldMapSize);
_outmsg.Write(_mineserver.MapManager.Mapsize);
_netserver.SendMessage(_outmsg, player.NetConn, NetDeliveryMethod.ReliableOrdered);
}
示例15: Encode
public void Encode(NetOutgoingMessage om)
{
om.Write(this.Id);
om.Write(this.MessageTime);
om.Write(this.Health);
om.Write(this.MaxHealth);
}