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


C# NetworkWriter.WritePackedUInt32方法代码示例

本文整理汇总了C#中UnityEngine.Networking.NetworkWriter.WritePackedUInt32方法的典型用法代码示例。如果您正苦于以下问题:C# NetworkWriter.WritePackedUInt32方法的具体用法?C# NetworkWriter.WritePackedUInt32怎么用?C# NetworkWriter.WritePackedUInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UnityEngine.Networking.NetworkWriter的用法示例。


在下文中一共展示了NetworkWriter.WritePackedUInt32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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

示例2: 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

示例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.WritePackedUInt32((uint) this.stateHash);
     writer.Write(this.normalizedTime);
     writer.WriteBytesAndSize(this.parameters, this.parameters.Length);
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:7,代码来源:AnimationMessage.cs

示例5: Serialize

 public static byte[] Serialize(INetMsg msg)
 {
     var networkWriter = new NetworkWriter();
     uint index = GetMsgIndexFromType( msg.GetType() );
     networkWriter.WritePackedUInt32( index );
     ((MessageBase)msg).Serialize(networkWriter);
     return networkWriter.AsArray();
 }
开发者ID:Zammy,项目名称:ProjectSpaceship,代码行数:8,代码来源:Messages.cs

示例6: 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

示例7: 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);
     if (this.playerIds == null)
     {
         writer.WritePackedUInt32(0);
     }
     else
     {
         writer.WritePackedUInt32((uint) this.playerIds.Length);
         for (int i = 0; i < this.playerIds.Length; i++)
         {
             writer.Write(this.playerIds[i].netId);
             writer.WritePackedUInt32((uint) this.playerIds[i].playerControllerId);
         }
     }
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:21,代码来源:PeerInfoMessage.cs

示例8: OnSerialize

 public override bool OnSerialize(NetworkWriter writer, bool initialState)
 {
     writer.WritePackedUInt32(1);
     writer.Write(this.m_Slot);
     writer.Write(this.m_ReadyToBegin);
     return true;
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:7,代码来源:NetworkLobbyPlayer.cs

示例9: OnSerialize

 public override bool OnSerialize(NetworkWriter writer, bool initialState)
 {
   if (!initialState)
   {
     if ((int) this.syncVarDirtyBits == 0)
     {
       writer.WritePackedUInt32(0U);
       return false;
     }
     writer.WritePackedUInt32(1U);
   }
   switch (this.transformSyncMode)
   {
     case NetworkTransform.TransformSyncMode.SyncNone:
       return false;
     case NetworkTransform.TransformSyncMode.SyncTransform:
       this.SerializeModeTransform(writer);
       break;
     case NetworkTransform.TransformSyncMode.SyncRigidbody2D:
       this.SerializeMode2D(writer);
       break;
     case NetworkTransform.TransformSyncMode.SyncRigidbody3D:
       this.SerializeMode3D(writer);
       break;
     case NetworkTransform.TransformSyncMode.SyncCharacterController:
       this.SerializeModeCharacterController(writer);
       break;
   }
   return true;
 }
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:30,代码来源:NetworkTransform.cs

示例10: Serialize

 public override void Serialize(NetworkWriter writer)
 {
     writer.WritePackedUInt32((uint) this.value);
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:4,代码来源:IntegerMessage.cs

示例11: Serialize

 public override void Serialize(NetworkWriter writer)
 {
     writer.Write(this.netId);
     writer.WritePackedUInt32((uint) this.hash);
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:5,代码来源:AnimationTriggerMessage.cs

示例12: WriteParameters

 private void WriteParameters(NetworkWriter writer, bool autoSend)
 {
     for (int index = 0; index < this.m_Animator.parameters.Length; ++index)
       {
     if (!autoSend || this.GetParameterAutoSend(index))
     {
       AnimatorControllerParameter controllerParameter = this.m_Animator.parameters[index];
       if (controllerParameter.type == AnimatorControllerParameterType.Int)
       {
     writer.WritePackedUInt32((uint) this.m_Animator.GetInteger(controllerParameter.nameHash));
     this.SetSendTrackingParam(controllerParameter.name + ":" + this.m_Animator.GetInteger(controllerParameter.nameHash).ToString(), index);
       }
       if (controllerParameter.type == AnimatorControllerParameterType.Float)
       {
     writer.Write(this.m_Animator.GetFloat(controllerParameter.nameHash));
     this.SetSendTrackingParam(controllerParameter.name + ":" + this.m_Animator.GetFloat(controllerParameter.nameHash).ToString(), index);
       }
       if (controllerParameter.type == AnimatorControllerParameterType.Bool)
       {
     writer.Write(this.m_Animator.GetBool(controllerParameter.nameHash));
     this.SetSendTrackingParam(controllerParameter.name + ":" + this.m_Animator.GetBool(controllerParameter.nameHash).ToString(), index);
       }
     }
       }
 }
开发者ID:Kitabalef,项目名称:Unet-Decompiles,代码行数:25,代码来源:NetworkAnimator.cs

示例13: WriteParameters

 private void WriteParameters(NetworkWriter writer, bool autoSend)
 {
     for (int i = 0; i < this.m_Animator.parameters.Length; i++)
     {
         if (!autoSend || this.GetParameterAutoSend(i))
         {
             AnimatorControllerParameter parameter = this.m_Animator.parameters[i];
             if (parameter.type == AnimatorControllerParameterType.Int)
             {
                 writer.WritePackedUInt32((uint) this.m_Animator.GetInteger(parameter.nameHash));
                 this.SetSendTrackingParam(parameter.name + ":" + this.m_Animator.GetInteger(parameter.nameHash), i);
             }
             if (parameter.type == AnimatorControllerParameterType.Float)
             {
                 writer.Write(this.m_Animator.GetFloat(parameter.nameHash));
                 this.SetSendTrackingParam(parameter.name + ":" + this.m_Animator.GetFloat(parameter.nameHash), i);
             }
             if (parameter.type == AnimatorControllerParameterType.Bool)
             {
                 writer.Write(this.m_Animator.GetBool(parameter.nameHash));
                 this.SetSendTrackingParam(parameter.name + ":" + this.m_Animator.GetBool(parameter.nameHash), i);
             }
         }
     }
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:25,代码来源:NetworkAnimator.cs

示例14: Serialize

 public override void Serialize(NetworkWriter writer)
 {
     writer.WritePackedUInt32((uint) this.connectionId);
     writer.Write(this.netId);
     writer.Write(this.authorityState);
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:6,代码来源:PeerAuthorityMessage.cs

示例15: OnSerialize

 public override bool OnSerialize(NetworkWriter writer, bool initialState)
 {
   if (!initialState)
   {
     if ((int) this.syncVarDirtyBits == 0)
     {
       writer.WritePackedUInt32(0U);
       return false;
     }
     writer.WritePackedUInt32(1U);
   }
   this.SerializeModeTransform(writer);
   return true;
 }
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:14,代码来源:NetworkTransformChild.cs


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