Пример #1
0
        public TileMatrix()
        {
            fLevels = new List <Dictionary <GPoint, Tile> >(33);
            fLock   = new RWLock();
            fTemp   = new List <KeyValuePair <GPoint, Tile> >(44);

            for (int i = 0; i < fLevels.Capacity; i++)
            {
                fLevels.Add(new Dictionary <GPoint, Tile>(55, new GPointComparer()));
            }
        }
Пример #2
0
        void Dispose(bool disposing)
        {
            if (fLock != null)
            {
                if (disposing)
                {
                    ClearAllLevels();
                }

                fLevels.Clear();
                fLevels = null;

                fTemp.Clear();
                fTemp = null;

                fLock.Dispose();
                fLock = null;
            }
        }