当前位置: 首页>>代码示例>>C#>>正文


C# NetworkWriter.Write方法代码示例

本文整理汇总了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);
 }
开发者ID:yuta0023,项目名称:demo,代码行数:7,代码来源:EditorMessages.cs

示例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);
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:7,代码来源:AnimationMessage.cs

示例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);
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:7,代码来源:OverrideTransformMessage.cs

示例4: Serialize

 public override void Serialize(NetworkWriter writer)
 {
     writer.Write(this.netId);
     writer.Write(this.sceneId);
     writer.Write(this.position);
     writer.WriteBytesFull(this.payload);
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:7,代码来源:ObjectSpawnSceneMessage.cs

示例5: Serialize

 public override void Serialize(NetworkWriter writer)
 {
     writer.Write(proxyId);
     writer.Write((short)packet.Compression);
     writer.Write(packet.Length);
     writer.WriteBytesFull(packet.Data);
 }
开发者ID:dgkae,项目名称:unityassets,代码行数:7,代码来源:VoiceChatPacketMessage.cs

示例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);
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:8,代码来源:PeerInfoMessage.cs

示例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;
    }
开发者ID:atrakeur,项目名称:unity-unet-authoritative-networking,代码行数:14,代码来源:CharacterNetworkSync.cs

示例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);
     }
 }
开发者ID:imclab,项目名称:SpaceLeap,代码行数:9,代码来源:ReplacementPanelActionSet.cs

示例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);
 }
开发者ID:PlayFab,项目名称:PlayFabGameServer,代码行数:9,代码来源:MessageModels.cs

示例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);
     }
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:9,代码来源:CRCMessage.cs

示例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);
 }
开发者ID:buronix,项目名称:LLApi-Basic-Implementation,代码行数:22,代码来源:ServerInfoManager.cs

示例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;
 }
开发者ID:doctorpangloss,项目名称:Cordon2,代码行数:7,代码来源:SyncAnimatorOnLoad.cs

示例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);
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:7,代码来源:ReconnectMessage.cs

示例14: Serialize

 public override void Serialize(NetworkWriter writer)
 {
     writer.Write((ushort) this.peers.Length);
     foreach (PeerInfoMessage message in this.peers)
     {
         message.Serialize(writer);
     }
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:8,代码来源:PeerListMessage.cs

示例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);
     }
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:9,代码来源:PeerListMessage.cs


注:本文中的UnityEngine.Networking.NetworkWriter.Write方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。