Class NpcAspect
Aspect of an entity that represents a non-player character (NPC).
public class NpcAspect : UnitAspect, IAspect<Entity>, IAspect
- Inheritance
-
BaseAspect<Entity>NpcAspect
- Implements
-
IAspect<Entity>
- Inherited Members
- Extension Methods
Constructors
NpcAspect(EntityAspect, bool)
Initializes a new instance of the EntityAspect class with another aspect.
public NpcAspect(EntityAspect aspect, bool strict = true)
Parameters
aspectEntityAspectThe aspect to copy from.
strictboolIf true, the aspect will throw an exception if the entity is null.
Exceptions
- ArgumentNullException
Thrown when the entity of the aspect is null.
NpcAspect(Entity, bool)
Initializes a new instance of the EntityAspect class with the specified entity.
public NpcAspect(Entity entity, bool strict = true)
Parameters
entityEntityThe entity to associate with this aspect.
strictboolIf true, the aspect will throw an exception if the entity is null.
Exceptions
- ArgumentNullException
Thrown when the entity is null.
Fields
NpcCategories
public static readonly HashSet<UnitCategory> NpcCategories
Field Value
- HashSet<UnitCategory>
Properties
Queries
public static NpcQueries Queries { get; }
Property Value
Methods
Is(Entity)
public static bool Is(Entity entity)
Parameters
entityEntity
Returns
Qualifies(Entity)
Checks if the entity qualifies for this aspect.
public override bool Qualifies(Entity entity)
Parameters
entityEntity
Returns
- bool
Returns true if the entity qualifies, otherwise false.