public IPooledEnumerable GetMobilesInBounds( Rectangle2D bounds ) { if ( this == Map.Internal ) return NullEnumerable.Instance; return PooledEnumerable.Instantiate( TypedEnumerator.Instantiate( this, bounds, SectorEnumeratorType.Mobiles ) ); }
public IPooledEnumerable GetItemsInRange( Point3D p ) { if ( this == Map.Internal ) return NullEnumerable.Instance; return PooledEnumerable.Instantiate( TypedEnumerator.Instantiate( this, new Rectangle2D( p.m_X - 18, p.m_Y - 18, 37, 37 ), SectorEnumeratorType.Items ) ); }
public IPooledEnumerable GetMobilesInRange( Point3D p, int range ) { if ( this == Map.Internal ) return NullEnumerable.Instance; return PooledEnumerable.Instantiate( TypedEnumerator.Instantiate( this, new Rectangle2D( p.m_X - range, p.m_Y - range, range * 2 + 1, range * 2 + 1 ), SectorEnumeratorType.Mobiles ) ); }
public static TypedEnumerator Instantiate( Map map, Rectangle2D bounds, SectorEnumeratorType type ) { TypedEnumerator 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 TypedEnumerator( map, bounds, type ); } return e; }
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; }