Exemple #1
0
        private void ResetData()
        {
            GameDataInfo <T> .ResetGlobalTypeCounter();

            InfoByName = new Dictionary <string, T>();
            InfoByType = new List <T>();
        }
Exemple #2
0
        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);
            }
        }