public void Read(BinaryInputStream s)
        {
            properties.ReadFromStream(s);
            code.Read(s);
            layers = s.ReadObjectArray<ActLayerObject>();
            resources = s.ReadObjectArray<AbstractActResourceObject>();

            SetupDefaultRenderLayers();
        }
 public void Read(BinaryInputStream s)
 {
     properties.ReadFromStream(s);
     keys = s.ReadObjectArray<ActKeyObject>();
     if (keys.Count != 1)
     {
         Task.SendError("layer should contain one key");
     }
     s.ReadInt32(0);
     code.Read(s);
 }
        public void Read(BinaryInputStream s)
        {
            int size = s.ReadInt32();
            int len = s.ReadInt32();
            if (len != 56)
            {
                throw new Exception("invalid element size in layout");
            }
            chips = s.ReadSerializableArray(size, bs => new ChipElement());

            resources = s.ReadObjectArray<AbstractResourceInfoObject>();
        }