Represents an object reference on the mainline.
Inheritance: SpriterMainlineObjectBase
コード例 #1
0
        void ReadMainlineObjectRef(XmlElement element, SpriterMainlineKey key)
        {
            var obj = new SpriterMainlineObjectRef();
            key.objects.Add(obj);

            foreach(XmlAttribute attribute in element.Attributes)
            {
                // id
                if (attribute.Name.Equals("id"))
                    obj.ID = int.Parse(attribute.Value);

                // parent
                else if (attribute.Name.Equals("parent"))
                    obj.parent = int.Parse(attribute.Value);

                // timeline
                else if (attribute.Name.Equals("timeline"))
                    obj.timeline = int.Parse(attribute.Value);

                // key
                else if (attribute.Name.Equals("key"))
                    obj.key = int.Parse(attribute.Value);

                // z_index
                else if (attribute.Name.Equals("z_index"))
                    obj.zIndex = int.Parse(attribute.Value);
            }
        }