예제 #1
0
        private void AddProperty(XmlNode propertyNode)
        {
            AnchorProperty prop = new AnchorProperty();

            prop.Init(propertyNode, _onAddAnchorPropertyTex, _isLoadProcess);
            Properties.Add(prop);
        }
예제 #2
0
        public void AddAnchorProp(int ID, int propValue)
        {
            AnchorProperty property = new AnchorProperty();

            property.ID          = ID;
            property.NumTextures = propValue;
            property.Init(_onAddAnchorPropertyXML(Id, ID), _onAddAnchorPropertyTex, _isLoadProcess);
            AddProperty(property);
        }
예제 #3
0
        public int AddProperty(AnchorProperty property)
        {
            AnchorProperty prop = property;

            if (prop == null)
            {
                prop = new AnchorProperty();
                //                prop.Init(null, _onAddAnchorPropertyTex, _isLoadProcess);
                prop.Init(_onAddAnchorPropertyXML(Id, Properties.Count), _onAddAnchorPropertyTex, _isLoadProcess);
            }
            Properties.Add(prop);
            prop.ID = Properties.Count - 1;
            return(Properties.Count - 1);
        }
예제 #4
0
        private void SetProperty(XmlNode propertyNode)
        {
            AnchorProperty prop = new AnchorProperty();

            prop.Init(propertyNode, _onAddAnchorPropertyTex, _isLoadProcess);

            foreach (AnchorProperty p in Properties)
            {
                if (p.ID == prop.ID)
                {
                    p.Init(propertyNode, _onAddAnchorPropertyTex, _isLoadProcess);
                    return;
                }
            }
            AddProperty(propertyNode);
        }