當前位置: 首頁>>代碼示例>>C#>>正文


C# BinaryWriter.WriteMany方法代碼示例

本文整理匯總了C#中System.IO.BinaryWriter.WriteMany方法的典型用法代碼示例。如果您正苦於以下問題:C# BinaryWriter.WriteMany方法的具體用法?C# BinaryWriter.WriteMany怎麽用?C# BinaryWriter.WriteMany使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.IO.BinaryWriter的用法示例。


在下文中一共展示了BinaryWriter.WriteMany方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: WritePayload

        protected override void WritePayload(BinaryWriter writer)
        {
            writer.Write(UniqueId);
            writer.Write(Position);
            writer.Write(Velocity);
            writer.WriteMany(Knockback, Damage, OwnerPlayerId, Type, AiFlags.ConvertToByte());

            if(Ai != null)
            foreach (float ai in Ai)
                writer.Write(ai);
        }
開發者ID:SSStormy,項目名稱:OpenTerrariaClient,代碼行數:11,代碼來源:ProjectilePackets.cs

示例2: Pack

            public void Pack(Stream stream)
            {
                this.Metadata.Pack(stream);
                this.Settings.Pack(stream);
                for (int i = 0; i < this.Profiles.Length; i++) this.Profiles[i].Pack(stream);
                for (int i = 0; i < this.Months.Length; i++) this.Months[i].Pack(stream);

                using (BinaryWriter writer = new BinaryWriter(stream, Encoding.UTF8, true))
                {
                    writer.WriteMany(RESERVED_VALUE, EEPROM_RESERVED);
                }
            }
開發者ID:SzymonKatra,項目名稱:DzwonekIILOKielce,代碼行數:12,代碼來源:Device.cs

示例3: WritePayload

 protected override void WritePayload(BinaryWriter writer)
 {
     writer.WriteMany(PlayerId, Control, Pulley, SelectedItem);
     writer.Write(Position);
     writer.Write(Velocity);
 }
開發者ID:SSStormy,項目名稱:OpenTerrariaClient,代碼行數:6,代碼來源:PlayerPackets.cs

示例4: WritePayload

 protected override void WritePayload(BinaryWriter writer)
 {
     writer.WriteMany(PlayerId, QuestsCompleted);
 }
開發者ID:SSStormy,項目名稱:OpenTerrariaClient,代碼行數:4,代碼來源:NpcPackets.cs

示例5: WritePayload

 protected override void WritePayload(BinaryWriter writer)
 {
     writer.WriteMany(ItemId, Owner);
 }
開發者ID:SSStormy,項目名稱:OpenTerrariaClient,代碼行數:4,代碼來源:ItemPackets.cs


注:本文中的System.IO.BinaryWriter.WriteMany方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。