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


C# BigEndianStream.Write方法代码示例

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


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

示例1: OnSend

 /// <summary>
 ///   Sends the specified writer.
 /// </summary>
 /// <param name="writer"> The writer. </param>
 /// <param name="version"> The version. </param>
 /// <remarks>
 /// </remarks>
 protected override void OnSend(BigEndianStream writer, int version)
 {
     if (writer == null)
         throw new ArgumentNullException("writer");
     if (version >= 38)
     {
         writer.Write(Code);
         writer.Write((byte) EntityIds.Count ());
         foreach (int item in EntityIds)
         {
             writer.Write(item);
         }
     }
     else
     {
         if (EntityIds == null || EntityIds.Count () == 0)
         {
             writer.Write(Code);
             writer.Write(0);
         }
         else
             foreach (int item in EntityIds)
             {
                 writer.Write(Code);
                 writer.Write(item);
             }
     }
 }
开发者ID:pdelvo,项目名称:Pdelvo.Minecraft,代码行数:35,代码来源:EntityDestroy.cs

示例2: OnSend

        /// <summary>
        ///   Sends the specified writer.
        /// </summary>
        /// <param name="writer"> The writer. </param>
        /// <param name="version"> The version. </param>
        /// <remarks>
        /// </remarks>
        protected override void OnSend(BigEndianStream writer, int version)
        {
            if (writer == null)
                throw new ArgumentNullException("writer");
            writer.Write(Code);

            writer.Write(TeamName);
            writer.Write(Mode);
            if (Mode == 2 || Mode == 0)
            {
                writer.Write(TeamDisplayName);
                writer.Write(TeamPrefix);
                writer.Write(TeamSufix);
                if (version >= 60)
                    writer.Write(FriendlyFire);
                else
                    writer.Write(FriendlyFire != 0);
            }

            Players = Players ?? new string[0];
            writer.Write(PlayerCount);
            if (Mode == 0 || Mode == 3 || Mode == 4)
            {
                foreach (var player in Players)
                {
                    writer.Write(player);
                }
            }
        }
开发者ID:pdelvo,项目名称:Pdelvo.Minecraft,代码行数:36,代码来源:Teams.cs

示例3: OnSend

 /// <summary>
 /// Sends the specified writer.
 /// </summary>
 /// <param name="writer">The writer.</param>
 /// <param name="version">The version.</param>
 /// <remarks></remarks>
 protected override void OnSend(BigEndianStream writer, int version)
 {
     if (writer == null)
         throw new System.ArgumentNullException("writer");
     writer.Write(Code);
     writer.Write(ResponseType);
 }
开发者ID:splitice,项目名称:Pdelvo.Minecraft,代码行数:13,代码来源:RespawnRequestPacket.cs

示例4: OnSend

 /// <summary>
 ///   Sends the specified writer.
 /// </summary>
 /// <param name="writer"> The writer. </param>
 /// <param name="version"> The version. </param>
 /// <remarks>
 /// </remarks>
 protected override void OnSend(BigEndianStream writer, int version)
 {
     if (writer == null)
         throw new ArgumentNullException("writer");
     writer.Write(Code);
     writer.Write(Number);
 }
开发者ID:pdelvo,项目名称:Pdelvo.Minecraft,代码行数:14,代码来源:KeepAlive.cs

示例5: OnSend

        /// <summary>
        /// Sends the specified writer.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <param name="version">The version.</param>
        /// <remarks></remarks>
        protected override void OnSend(BigEndianStream writer, int version)
        {
            if (writer == null)
                throw new ArgumentNullException("writer");
            writer.Write(Code);

            if (version >= 32)
            {
                byte d = 0;

                d |= (byte)((Flying ? 1 : 0) << 0);
                d |= (byte)((InstantBuild ? 1 : 0) << 1);
                d |= (byte)((MayFly ? 1 : 0) << 2);
                d |= (byte)((Invulnerable ? 1 : 0) << 3);
                writer.Write(d);
                writer.Write(FlyingSpeed);
                writer.Write(WalkSpeed);
            }
            else
            {
                writer.Write(Flying);
                writer.Write(InstantBuild);
                writer.Write(MayFly);
                writer.Write(Invulnerable);
            }
        }
开发者ID:splitice,项目名称:Pdelvo.Minecraft,代码行数:32,代码来源:AbilityPacket.cs

示例6: OnSend

 /// <summary>
 /// Sends the specified writer.
 /// </summary>
 /// <param name="writer">The writer.</param>
 /// <param name="version">The version.</param>
 /// <remarks></remarks>
 protected override void OnSend(BigEndianStream writer, int version)
 {
     if (writer == null)
         throw new System.ArgumentNullException("writer");
     writer.Write(Code);
     writer.Write(StatisticId);
     writer.Write(Amount);
 }
开发者ID:splitice,项目名称:Pdelvo.Minecraft,代码行数:14,代码来源:IncrementStatistic.cs

示例7: OnSend

 /// <summary>
 ///   Sends the specified writer.
 /// </summary>
 /// <param name="writer"> The writer. </param>
 /// <param name="version"> The version. </param>
 /// <remarks>
 /// </remarks>
 protected override void OnSend(BigEndianStream writer, int version)
 {
     if (writer == null)
         throw new ArgumentNullException("writer");
     writer.Write(Code);
     writer.Write(EntityId);
     MetadataInfo.WriteMetadata(InnerData, writer);
 }
开发者ID:pdelvo,项目名称:Pdelvo.Minecraft,代码行数:15,代码来源:EntityMetadata.cs

示例8: OnSend

 /// <summary>
 /// Sends the specified writer.
 /// </summary>
 /// <param name="writer">The writer.</param>
 /// <param name="version">The version.</param>
 /// <remarks></remarks>
 protected override void OnSend(BigEndianStream writer, int version)
 {
     if (writer == null)
         throw new System.ArgumentNullException("writer");
     writer.Write(Code);
     writer.Write(Health);
     writer.Write(Food);
     writer.Write(FoodSaturation);
 }
开发者ID:splitice,项目名称:Pdelvo.Minecraft,代码行数:15,代码来源:UpdateHealth.cs

示例9: OnSend

 /// <summary>
 ///   Sends the specified writer.
 /// </summary>
 /// <param name="writer"> The writer. </param>
 /// <param name="version"> The version. </param>
 /// <remarks>
 /// </remarks>
 protected override void OnSend(BigEndianStream writer, int version)
 {
     if (writer == null)
         throw new ArgumentNullException("writer");
     writer.Write(Code);
     writer.Write(WindowId);
     writer.Write(Count);
     InventoryPacket.WritePayload(writer, Items);
 }
开发者ID:pdelvo,项目名称:Pdelvo.Minecraft,代码行数:16,代码来源:WindowItems.cs

示例10: OnSend

 /// <summary>
 ///   Sends the specified writer.
 /// </summary>
 /// <param name="writer"> The writer. </param>
 /// <param name="version"> The version. </param>
 /// <remarks>
 /// </remarks>
 protected override void OnSend(BigEndianStream writer, int version)
 {
     if (writer == null)
         throw new ArgumentNullException("writer");
     writer.Write(Code);
     writer.Write(UserEntity);
     writer.Write(TargetEntity);
     writer.Write(LeftClick);
 }
开发者ID:pdelvo,项目名称:Pdelvo.Minecraft,代码行数:16,代码来源:UseEntity.cs

示例11: OnSend

 /// <summary>
 /// Sends the specified writer.
 /// </summary>
 /// <param name="writer">The writer.</param>
 /// <param name="version">The version.</param>
 /// <remarks></remarks>
 protected override void OnSend(BigEndianStream writer, int version)
 {
     if (writer == null)
         throw new System.ArgumentNullException("writer");
     writer.Write(Code);
     writer.Write(WindowId);
     writer.Write(ProgressBarType);
     writer.Write(Value);
 }
开发者ID:splitice,项目名称:Pdelvo.Minecraft,代码行数:15,代码来源:UpdateProgressBar.cs

示例12: OnSend

        /// <summary>
        ///   Sends the specified writer.
        /// </summary>
        /// <param name="writer"> The writer. </param>
        /// <param name="version"> The version. </param>
        /// <remarks>
        /// </remarks>
        protected override void OnSend(BigEndianStream writer, int version)
        {
            if (writer == null)
                throw new ArgumentNullException("writer");
            writer.Write(Code);

            writer.Write(MessageColor);
            writer.WriteClassicString(TextMessage);
        }
开发者ID:pdelvo,项目名称:Pdelvo.Minecraft,代码行数:16,代码来源:Message.cs

示例13: OnSend

 /// <summary>
 /// Sends the specified writer.
 /// </summary>
 /// <param name="writer">The writer.</param>
 /// <param name="version">The version.</param>
 /// <remarks></remarks>
 protected override void OnSend(BigEndianStream writer, int version)
 {
     if (writer == null)
         throw new ArgumentNullException("writer");
     writer.Write(Code);
     writer.Write(EntityId);
     writer.Write(Yaw);
     writer.Write(Pitch);
 }
开发者ID:splitice,项目名称:Pdelvo.Minecraft,代码行数:15,代码来源:EntityLook.cs

示例14: OnSend

 /// <summary>
 /// Sends the specified writer.
 /// </summary>
 /// <param name="writer">The writer.</param>
 /// <param name="version">The version.</param>
 /// <remarks></remarks>
 protected override void OnSend(BigEndianStream writer, int version)
 {
     if (writer == null)
         throw new System.ArgumentNullException("writer");
     writer.Write(Code);
     writer.Write(WindowId);
     writer.Write(ActionNumber);
     writer.Write(Accepted);
 }
开发者ID:splitice,项目名称:Pdelvo.Minecraft,代码行数:15,代码来源:Transaction.cs

示例15: OnSend

 /// <summary>
 /// Sends the specified writer.
 /// </summary>
 /// <param name="writer">The writer.</param>
 /// <param name="version">The version.</param>
 /// <remarks></remarks>
 protected override void OnSend(BigEndianStream writer, int version)
 {
     if (writer == null)
         throw new System.ArgumentNullException("writer");
     writer.Write(Code);
     writer.Write(PlayerName);
     writer.Write(Online);
     writer.Write(Ping);
 }
开发者ID:splitice,项目名称:Pdelvo.Minecraft,代码行数:15,代码来源:PlayerListItem.cs


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