public override IEncodable Decode(BinaryInput stream) { int c = stream.ReadInt32(); for (int i = 0; i < c; i++) { SpriteLibraryDirectory obj = stream.ReadObject <SpriteLibraryDirectory>(); obj.Parent = this; this.Directories.Add(obj); } c = stream.ReadInt32(); for (int i = 0; i < c; i++) { SpriteLibrarySprite obj = stream.ReadObject <SpriteLibrarySprite>(); obj.Parent = this; this.Sprites.Add(obj); } return(this); }
public virtual IEncodable Decode(BinaryInput stream) { this.Name = stream.ReadString(); this.Deletable = stream.ReadBoolean(); int c = stream.ReadInt32(); for (int i = 0; i < c; i++) { SpriteLibraryDirectory child = stream.ReadObject <SpriteLibraryDirectory>(); child.Parent = this; Directories.Add(child); } c = stream.ReadInt32(); for (int i = 0; i < c; i++) { SpriteLibrarySprite child = stream.ReadObject <SpriteLibrarySprite>(); child.Parent = this; Sprites.Add(child); } return(this); }