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); }
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); }
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; }
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); }