private void AddProperty(XmlNode propertyNode) { AnchorProperty prop = new AnchorProperty(); prop.Init(propertyNode, _onAddAnchorPropertyTex, _isLoadProcess); Properties.Add(prop); }
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); }
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); }
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); }