API reference
TargetRules
Target policies of components that point at an entity (IIndexed of EntityId).
public static class TargetRulesMethods
WhenTargetDestroyed
public static ValueIndex<T, EntityId> WhenTargetDestroyed<T>(this ValueIndex<T, EntityId> index, TargetPolicy policy) where T : struct, IComponent, IIndexed<EntityId>;Decide what destroying an entity does to the T components whose key is that entity: an owner whose pet dies loses its Pet (TargetPolicy.Remove), a summon dies with its summoner (TargetPolicy.Destroy). ChildOf is TargetPolicy.Destroy from the start; others are TargetPolicy.Keep. Applied inside every destroy (the index is kept built); O(1) per destroyed entity, O(1) per link it had. Owner thread only.
Edit on GitHub
Last updated on
How is this guide?