Exemple #1
0
			private SectorEnumerator( Map map, Rectangle2D bounds, SectorEnumeratorType type )
			{
				m_Map = map;
				m_Bounds = bounds;
				m_Type = type;

				Reset();
			}
Exemple #2
0
			public static SectorEnumerator Instantiate( Map map, Rectangle2D bounds, SectorEnumeratorType type )
			{
				SectorEnumerator e;

				if ( m_InstancePool.Count > 0 )
				{
					e = m_InstancePool.Dequeue();

					e.m_Map = map;
					e.m_Bounds = bounds;
					e.m_Type = type;

					e.Reset();
				}
				else
				{
					e = new SectorEnumerator( map, bounds, type );
				}

				return e;
			}
Exemple #3
0
            public static TypedEnumerator Instantiate( Map map, Rectangle2D bounds, SectorEnumeratorType type )
            {
                TypedEnumerator e;

                if ( m_InstancePool.Count > 0 )
                {
                    e = (TypedEnumerator)m_InstancePool.Dequeue();

                    e.m_Map = map;
                    e.m_Bounds = bounds;
                    e.m_Type = type;

                    e.Reset();
                }
                else
                {
                    e = new TypedEnumerator( map, bounds, type );
                }

                return e;
            }
Exemple #4
0
            public TypedEnumerator( Map map, Rectangle2D bounds, SectorEnumeratorType type )
            {
                m_Map = map;
                m_Bounds = bounds;
                m_Type = type;

                Reset();
            }