Show / Hide Table of Contents

# Class EntityFilter<T>

##### Inheritance

object
AVLTree<T>
EntityFilter<T>
EntityList<T>

##### Implements

IEnumerable<T>
IEnumerable
IEntityFilter

##### Inherited Members

AVLTree<T>.Count
AVLTree<T>.Contains(T)
AVLTree<T>.TryGetMin(out T)
AVLTree<T>.TryGetMax(out T)
AVLTree<T>.GetEnumerator()

###### Namespace: LiteEntitySystem

###### Assembly: LiteEntitySystem.dll

##### Syntax

    public class EntityFilter<T> : AVLTree<T>, IEnumerable<T>, IEnumerable, IEntityFilter where T : InternalEntity

##### Type Parameters

Name | Description
--- | ---
T |

### Methods

#### SubscribeToConstructed(Action<T>, bool)

Called when entity created and synced

callbackcall that callback on existing entities in this filter/list

##### Declaration

    public void SubscribeToConstructed(Action<T> onConstructed, bool callOnExisting)

##### Parameters

Type | Name | Description
--- | --- | ---
Action<T> | onConstructed |
bool | callOnExisting |

#### UnsubscribeToConstructed(Action<T>)

Called when entity created and synced

callback

##### Declaration

    public void UnsubscribeToConstructed(Action<T> onConstructed)

##### Parameters

Type | Name | Description
--- | --- | ---
Action<T> | onConstructed |

### Events

#### OnDestroyed

Called when entity is removed/destroyed

##### Declaration

    public event Action<T> OnDestroyed

##### Event Type

Type | Description
--- | ---
Action<T> |

### Implements

IEnumerable<T>
IEnumerable
IEntityFilter