Click or drag to resize
CompoundEntitiesT Class
Manages all entities that have a specific component configuration.
Inheritance Hierarchy
SystemObject
  Slash.Application.SystemsCompoundEntitiesT

Namespace: Slash.Application.Systems
Assembly: Slash.Application (in Slash.Application.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public sealed class CompoundEntities<T> : IEnumerable<T>, 
	IEnumerable
where T : class, new()

Type Parameters

T
Type that contains information about component configuration and stores entities.

The CompoundEntitiesT type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyAllowEntity
Special filter to use before accepting an entity.
Public propertyEntities
Dictionary of all current matching entities.
Top
Methods
  NameDescription
Public methodGetEntity
Returns the entity with the specified id if one exists; otherwise null.
Public methodGetEnumerator
Returns an enumerator that iterates through all current entities.
Top
Events
  NameDescription
Public eventEntityAdded
Called when an entity was added that matches the configuration.
Public eventEntityRemoved
Called when an entity was removed.
Top
Extension Methods
  NameDescription
Public Extension MethodContainsAllT
Checks whether the first sequence contains all elements of the second one.
(Defined by EnumerableExtensionMethods.)
Public Extension MethodIsNullOrEmptyOverloaded.
Determines whether the collection is null or contains no elements.
(Defined by EnumerableExtensionMethods.)
Public Extension MethodIsNullOrEmptyTOverloaded.
Determines whether the collection is null or contains no elements.
(Defined by EnumerableExtensionMethods.)
Public Extension MethodRandomItemT
Returns a random item from the specified sequence.
(Defined by EnumerableExtensionMethods.)
Public Extension MethodRandomItemOrDefaultTOverloaded.
Returns a random item from the specified sequence or the default value of the specified type if the sequence is null or empty.
(Defined by EnumerableExtensionMethods.)
Public Extension MethodRandomItemOrDefaultT(T)Overloaded.
Returns a random item from the specified sequence or the specified default value if the sequence is null or empty.
(Defined by EnumerableExtensionMethods.)
Public Extension MethodRandomSelectTOverloaded.
Selects a random item from the specified enumerable.
(Defined by EnumerableExtensionMethods.)
Public Extension MethodRandomSelectT(Int32)Overloaded.
Selects the specified number of random items from the specified enumerable. If the number of items in the enumerable is smaller than the specified number of selections, the enumerable itself is returned.
(Defined by EnumerableExtensionMethods.)
Public Extension MethodRandomSelectT(Int32, ActionT)Overloaded.
Executes the specified action for the specified number of random items from the specified enumerable.
(Defined by EnumerableExtensionMethods.)
Public Extension MethodRandomWeightedItemT
Returns a random weighted item from the specified sequence. Uses the specified function to get the weight of an item. Idea was taken from http://stackoverflow.com/questions/17912005/quick-way-of-selecting-a-random-item-from-a-list-with-varying-probabilities-ba
(Defined by EnumerableExtensionMethods.)
Top
See Also