private void ResetData() { GameDataInfo <T> .ResetGlobalTypeCounter(); InfoByName = new Dictionary <string, T>(); InfoByType = new List <T>(); }
internal override void LoadDataFromXml(XmlElement rootElement) { ResetData(); foreach (XmlNode xmlNode in rootElement.ChildNodes) { if (!(xmlNode is XmlElement element)) { continue; } var info = GameDataInfo <T> .CreateByElement(element); InfoByType.Add(info); InfoByName.Add(info.Name, info); } }