本文整理汇总了C#中UnityEngine.Networking.NetworkWriter.Write方法的典型用法代码示例。如果您正苦于以下问题:C# NetworkWriter.Write方法的具体用法?C# NetworkWriter.Write怎么用?C# NetworkWriter.Write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnityEngine.Networking.NetworkWriter
的用法示例。
在下文中一共展示了NetworkWriter.Write方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Serialize
public override void Serialize(NetworkWriter writer)
{
base.Serialize(writer);
writer.Write(Polyline.Count);
foreach (var vector3 in Polyline)
writer.Write(vector3);
}
示例2: Serialize
public override void Serialize(NetworkWriter writer)
{
writer.Write(this.netId);
writer.WritePackedUInt32((uint) this.stateHash);
writer.Write(this.normalizedTime);
writer.WriteBytesAndSize(this.parameters, this.parameters.Length);
}
示例3: Serialize
public override void Serialize(NetworkWriter writer)
{
writer.Write(this.netId);
writer.WriteBytesFull(this.payload);
writer.Write(this.teleport);
writer.WritePackedUInt32((uint) this.time);
}
示例4: Serialize
public override void Serialize(NetworkWriter writer)
{
writer.Write(this.netId);
writer.Write(this.sceneId);
writer.Write(this.position);
writer.WriteBytesFull(this.payload);
}
示例5: Serialize
public override void Serialize(NetworkWriter writer)
{
writer.Write(proxyId);
writer.Write((short)packet.Compression);
writer.Write(packet.Length);
writer.WriteBytesFull(packet.Data);
}
示例6: Serialize
public override void Serialize(NetworkWriter writer)
{
writer.WritePackedUInt32((uint) this.connectionId);
writer.Write(this.address);
writer.WritePackedUInt32((uint) this.port);
writer.Write(this.isHost);
writer.Write(this.isYou);
}
示例7: OnSerialize
/// <summary>
/// Server: Serialize the state over network
/// </summary>
/// <param name="writer"></param>
/// <param name="initialState"></param>
/// <returns></returns>
public override bool OnSerialize(NetworkWriter writer, bool initialState)
{
writer.Write(serverLastState.state);
writer.Write(serverLastState.position);
writer.Write(serverLastState.rotation);
return true;
}
示例8: Serialize
public override void Serialize(NetworkWriter writer)
{
base.Serialize(writer);
writer.Write(_instructionBase);
writer.Write(_variantReplacements.Length);
foreach (string replacement in _variantReplacements) {
writer.Write(replacement);
}
}
示例9: Serialize
public override void Serialize(NetworkWriter writer)
{
writer.Write(ChannelId);
writer.Write(SenderUserId);
writer.Write(SenderUserName);
writer.Write(Message);
var json = JsonWrapper.SerializeObject(Timestamp);
writer.Write(json);
}
示例10: Serialize
public override void Serialize(NetworkWriter writer)
{
writer.Write((ushort) this.scripts.Length);
for (int i = 0; i < this.scripts.Length; i++)
{
writer.Write(this.scripts[i].name);
writer.Write(this.scripts[i].channel);
}
}
示例11: PlayerStatusUpdate
/// <summary>
/// Send an Update to all Clients of the Status Connection of a Player
/// </summary>
/// <remarks>
/// Order:
/// String UserName
/// bool ConnectedStatus
/// float ServerTime
/// </remarks>
/// <param name="UserName"></param>
/// <param name="connectedStatus"></param>
/// <param name="ServerTime"></param>
public void PlayerStatusUpdate(String UserName, bool connectedStatus, float ServerTime)
{
NetworkWriter data = new NetworkWriter();
data.Write((ushort)Subjects.PlayerStatusUpdate);
data.Write(UserName);
data.Write(connectedStatus);
data.Write(ServerTime);
OutputMessage output = new OutputMessage(data);
GameServer.LLApiServer.addOutPutMessageToQueue(output);
}
示例12: OnSerialize
public override bool OnSerialize(NetworkWriter writer, bool initialState)
{
var serialized = base.OnSerialize (writer, initialState);
var time = animator.playbackTime;
writer.Write (time);
return serialized;
}
示例13: Serialize
public override void Serialize(NetworkWriter writer)
{
writer.WritePackedUInt32((uint) this.oldConnectionId);
writer.WritePackedUInt32((uint) this.playerControllerId);
writer.Write(this.netId);
writer.WriteBytesAndSize(this.msgData, this.msgSize);
}
示例14: Serialize
public override void Serialize(NetworkWriter writer)
{
writer.Write((ushort) this.peers.Length);
foreach (PeerInfoMessage message in this.peers)
{
message.Serialize(writer);
}
}
示例15: Serialize
public override void Serialize(NetworkWriter writer)
{
writer.WritePackedUInt32((uint) this.oldServerConnectionId);
writer.Write((ushort) this.peers.Length);
for (int i = 0; i < this.peers.Length; i++)
{
this.peers[i].Serialize(writer);
}
}