Class ItemAspect
Aspect of an entity that represents an item.
public class ItemAspect : EntityAspect, IAspect<Entity>, IAspect
- Inheritance
-
BaseAspect<Entity>ItemAspect
- Implements
-
IAspect<Entity>
- Inherited Members
- Extension Methods
Constructors
ItemAspect(EntityAspect, bool)
Initializes a new instance of the EntityAspect class with another aspect.
public ItemAspect(EntityAspect aspect, bool strict = true)
Parameters
aspect
EntityAspectThe aspect to copy from.
strict
boolIf true, the aspect will throw an exception if the entity is null.
Exceptions
- ArgumentNullException
Thrown when the entity of the aspect is null.
Properties
EquipmentType
public EquipmentType? EquipmentType { get; }
Property Value
- EquipmentType?
ItemCategory
public ItemCategory? ItemCategory { get; }
Property Value
- ItemCategory?
ItemType
public ItemType? ItemType { get; }
Property Value
- ItemType?
Level
Gets the level of the item associated with this aspect.
public ItemLevel? Level { get; }
Property Value
- ItemLevel?
Name
Gets the name of the item associated with this aspect.
public string? Name { get; }
Property Value
Queries
public static ItemQueries Queries { get; }
Property Value
Methods
GetConsumableTooltip()
Gets the tooltip for the consumable item associated with this aspect.
public string? GetConsumableTooltip()
Returns
Is(Entity)
public static bool Is(Entity entity)
Parameters
entity
Entity
Returns
Qualifies(Entity)
Checks if the entity qualifies for this aspect.
public override bool Qualifies(Entity entity)
Parameters
entity
Entity
Returns
- bool
Returns true if the entity qualifies, otherwise false.