コード例 #1
0
        private void InitializeDatabase(IEnumerable<Item> aItems)
        {
            m_Items = new HashSet<Item>();
            m_IDGenerator = new UniqueNumberGenerator(1);
            IEnumerator<Item> iter = aItems.GetEnumerator();
            while (iter.MoveNext())
            {
                if (iter.Current == null)
                {
                    continue;
                }

                Item item = iter.Current;
                item.HashItem();
            }
        }
コード例 #2
0
        private void InitializeDatabase()
        {
            m_Items = new HashSet<Item>();
            m_IDGenerator = new UniqueNumberGenerator(1);
            IEnumerator<Item> iter = m_ItemList.GetEnumerator();;
            while(iter.MoveNext())
            {
                if(iter.Current == null)
                {
                    continue;
                }

                Item item = iter.Current;
                item.HashItem();
                m_Items.Add(item);
            }

            if(m_Items != null && m_Items.Count == 0)
            {
                DebugUtils.LogWarning(NO_ITEM_DATABASE);
            }
            if(m_Items == null )
            {
                DebugUtils.LogWarning(ITEM_DATA_BASE_FAILURE);
            }
            m_ItemList = null;
        }