Пример #1
0
        public override void Encode(BinaryOutput stream)
        {
            base.Encode(stream);

            stream.Write((byte)this.Facing);
            stream.Write(Effects.Count);
            EffectIO io = new EffectIO(stream);

            Effects.ForEach(io.Write);
        }
Пример #2
0
        public override IEncodable Decode(BinaryInput stream)
        {
            base.Decode(stream);

            this.Facing = (Facing)stream.ReadByte();
            EffectIO io = new EffectIO(stream);
            int      c  = stream.ReadInt32();

            for (int i = 0; i < c; i++)
            {
                Effects.Add(io.Read());
            }

            return(this);
        }
Пример #3
0
		public override IEncodable Decode(BinaryInput stream) {
			base.Decode(stream);

			this.Facing = (Facing) stream.ReadByte();
			EffectIO io = new EffectIO(stream);
			int c = stream.ReadInt32();
			for (int i = 0; i < c; i++) {
				Effects.Add(io.Read());
			}

			return this;
		}
Пример #4
0
		public override void Encode(BinaryOutput stream) {
			base.Encode(stream);

			stream.Write((byte) this.Facing);
			stream.Write(Effects.Count);
			EffectIO io = new EffectIO(stream);
			Effects.ForEach(io.Write);
		}