Click or drag to resize
SpriteCollection Class
Categorizes / collects sprite instances
Inheritance Hierarchy

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
[SerializableAttribute]
public class SpriteCollection : CollectionBase

The SpriteCollection type exposes the following members.

Constructors
  NameDescription
Public methodSpriteCollection
Constructs a sprite collection given a list of all the sprites it should contain.
Top
Methods
  NameDescription
Public methodAdd
Add a dynamic sprite to the end of this sprite collection.
Public methodClean
Remove inactive dynamic sprites from the collection
Public methodClear
Removes all objects from the CollectionBase instance. This method cannot be overridden.
(Inherited from CollectionBase.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through the CollectionBase instance.
(Inherited from CollectionBase.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf
Determine the index of the specified sprite in the collection.
Public methodRemove
Remove the specified sprite from this collection.
Public methodRemoveAt
Removes the element at the specified index of the CollectionBase instance. This method is not overridable.
(Inherited from CollectionBase.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldStatic membermaxCollectionSize
Defines a maximum sprite collection size to help ensure dynamic sprites are not "leaking" into the system without getting cleaned up.
Public fieldstaticSize
Indicates the initial size of this collection, and the size below which sprites are never removed.
Top
Properties
  NameDescription
Public propertyCapacity
Gets or sets the number of elements that the CollectionBase can contain.
(Inherited from CollectionBase.)
Public propertyCount
Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.
(Inherited from CollectionBase.)
Public propertyItem
Return a sprite instance from the collection given its 0-based index.
Top
Remarks
Instances of this class are used both to represent the entire collection of sprites contained within a layer m_Sprites as well as sub-collections of these sprites divided into individual categories, exposed by m_SpriteCategories. Sprite collections can contain static and dynamic sprites. For more information about this distinction, see remarks in staticSize.
See Also