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


C# Stream.WriteBoolean方法代码示例

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


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

示例1: WriteToStream

 public override void WriteToStream(Stream aStream)
 {
     base.WriteToStream (aStream);
     aStream.WriteInt (UserID);
     aStream.WriteInt (TargetID);
     aStream.WriteBoolean (LeftClick);
 }
开发者ID:rbrian,项目名称:mccslib,代码行数:7,代码来源:Packets.cs

示例2: Pack

        public void Pack(Stream stream)
        {
            var flags = TileFlags.None;

            if (Active)
                flags |= TileFlags.Active;

            if (HasWall)
                flags |= TileFlags.Wall;

            if (HasLiquid)
                flags |= TileFlags.Liquid;

            if (Wire)
                flags |= TileFlags.Wire;

            stream.WriteInt8((byte) flags);

            if (Active)
            {
                stream.WriteInt8(Type);
                if (FrameImportant)
                {
                    stream.WriteInt16(FrameX);
                    stream.WriteInt16(FrameY);
                }
            }

            if (HasWall)
                stream.WriteInt8(Wall);

            if (HasLiquid)
            {
                stream.WriteInt8(Liquid);
                stream.WriteBoolean(Lava);
            }
        }
开发者ID:kmcfate,项目名称:TShock,代码行数:37,代码来源:NetTile.cs

示例3: Pack

 public override void Pack(Stream stream)
 {
     stream.WriteInt32(Time);
     stream.WriteBoolean(DayTime);
     stream.WriteInt8(MoonPhase);
     stream.WriteBoolean(BloodMoon);
     stream.WriteInt32(MaxTilesX);
     stream.WriteInt32(MaxTilesY);
     stream.WriteInt32(SpawnX);
     stream.WriteInt32(SpawnY);
     stream.WriteInt32(WorldSurface);
     stream.WriteInt32(RockLayer);
     stream.WriteInt32(WorldID);
     stream.WriteInt8((byte) WorldFlags);
     stream.WriteBytes(Encoding.UTF8.GetBytes(WorldName));
 }
开发者ID:ZeDingo,项目名称:TShock,代码行数:16,代码来源:WorldInfoMsg.cs

示例4: Pack

 public override void Pack(Stream stream)
 {
     stream.WriteInt32(Time);
     stream.WriteBoolean(DayTime);
     stream.WriteInt8(MoonPhase);
     stream.WriteBoolean(BloodMoon);
     stream.WriteBoolean(Eclipse);
     stream.WriteInt32(MaxTilesX);
     stream.WriteInt32(MaxTilesY);
     stream.WriteInt32(SpawnX);
     stream.WriteInt32(SpawnY);
     stream.WriteInt32(WorldSurface);
     stream.WriteInt32(RockLayer);
     stream.WriteInt32(WorldID);
     stream.WriteByte(MoonType);
     stream.WriteInt32(TreeX0);
     stream.WriteInt32(TreeX1);
     stream.WriteInt32(TreeX2);
     stream.WriteByte(TreeStyle0);
     stream.WriteByte(TreeStyle1);
     stream.WriteByte(TreeStyle2);
     stream.WriteByte(TreeStyle3);
     stream.WriteInt32(CaveBackX0);
     stream.WriteInt32(CaveBackX1);
     stream.WriteInt32(CaveBackX2);
     stream.WriteByte(CaveBackStyle0);
     stream.WriteByte(CaveBackStyle1);
     stream.WriteByte(CaveBackStyle2);
     stream.WriteByte(CaveBackStyle3);
     stream.WriteByte(SetBG0);
     stream.WriteByte(SetBG1);
     stream.WriteByte(SetBG2);
     stream.WriteByte(SetBG3);
     stream.WriteByte(SetBG4);
     stream.WriteByte(SetBG5);
     stream.WriteByte(SetBG6);
     stream.WriteByte(SetBG7);
     stream.WriteByte(IceBackStyle);
     stream.WriteByte(JungleBackStyle);
     stream.WriteByte(HellBackStyle);
     stream.WriteSingle(WindSpeed);
     stream.WriteByte(NumberOfClouds);
     stream.WriteInt8((byte)BossFlags);
     stream.WriteInt8((byte)BossFlags2);
     stream.WriteSingle(Rain);
     stream.WriteBytes(Encoding.UTF8.GetBytes(WorldName));
 }
开发者ID:CoderCow,项目名称:TShock,代码行数:47,代码来源:WorldInfoMsg.cs

示例5: Write

 public static void Write(object obj, Stream stream)
 {
     stream.WriteBoolean((bool)obj);
 }
开发者ID:FPCollab,项目名称:General,代码行数:4,代码来源:FastPacker.cs


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