Example #1
0
 public override void WriteToStream(Stream aStream)
 {
     base.WriteToStream (aStream);
     aStream.WriteInt (UserID);
     aStream.WriteInt (TargetID);
     aStream.WriteBoolean (LeftClick);
 }
Example #2
0
        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);
            }
        }
Example #3
0
 public override void WriteToStream(Stream aStream)
 {
     base.WriteToStream (aStream);
     aStream.WriteInt (X);
     aStream.WriteInt (Z);
     aStream.WriteBoolean(Mode);
 }
Example #4
0
 public override void WriteToStream(Stream aStream)
 {
     base.WriteToStream (aStream);
     aStream.WriteFloat(A);
     aStream.WriteFloat (B);
     aStream.WriteBoolean (C);
     aStream.WriteBoolean (D);
     aStream.WriteFloat (E);
     aStream.WriteFloat (F);
 }
Example #5
0
        public override void WriteToStream(Stream aStream)
        {
            base.WriteToStream (aStream);

            aStream.WriteDouble (X);
            aStream.WriteDouble (Stance);
            aStream.WriteDouble (Y);
            aStream.WriteDouble (Z);
            aStream.WriteFloat (Yaw);
            aStream.WriteFloat (Pitch);
            aStream.WriteBoolean (OnGround);
        }
Example #6
0
 public override void WriteToStream(Stream aStream)
 {
     base.WriteToStream (aStream);
     aStream.WriteBoolean (OnGround);
 }
Example #7
0
 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));
 }
Example #8
0
 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));
 }
Example #9
0
 public static void Write(object obj, Stream stream)
 {
     stream.WriteBoolean((bool)obj);
 }