예제 #1
0
        public static void Init()
        {
            m_SaveAndLoad = new SaveAndLoad <HelperInfoXMLFormat>();

            if (m_InformationLibrary == null)
            {
                m_InformationLibrary = new Dictionary <string, HelperInfoXMLFormat>();
            }
            else
            {
                m_InformationLibrary.Clear();
            }

            if (m_FastLookup == null)
            {
                m_FastLookup = new List <Category>();
            }
            else
            {
                m_FastLookup.Clear();
            }

            string HelperFilePath = "HelperInfo/HelperInfo_JP";

            // Load the helper information when the first time this manager been called.
            foreach (var data in m_SaveAndLoad.LoadInitData(HelperFilePath).DataList)
            {
                m_InformationLibrary.Add(data.InformationCategory.ToString(), data);
                m_FastLookup.Add(data.InformationCategory);
            }
        }