EntityEquipment
Class in SurvivEngine.Entities namespace
Inherits from SurvivEngine.Entities.EntityComponentBase
Implements SurvivEngine.Serialization.ISerializeDataParameters
Class in SurvivEngine.Entities namespace
Inherits from SurvivEngine.Entities.EntityComponentBase
Implements SurvivEngine.Serialization.ISerializeDataParameters
Class handling entity equipment slots, equipping / unequipping behaviour and armour damage negation.
Read-Only
All equipment slots that this entity has.
By default, the entity has head, torso, legs and feet slots.
Called when an equipment change modifies the armour value of the entity.
Event argument is the new armour value.
Calculates the damage value that should be applied to a piece of armour.
damage The incoming damage value.
Decreases the durability of all equipped armour by the given amount.
amount The amount of damage.
Equips the given item provided it is a piece of equipment and a matching equipment slot is available.
item The item to equip.
Unequips the specified item, if it is equipped.
Destroys the equipped item's GameObject.
item The item to unequip.
addItemToInventory Whether or not to add the removed item back to the inventory.
Unequips all equipped items in all equipment slots.
addItemToInventory Whether or not to add the removed item back to the inventory.
Checks if an equipment slot is available for the given equipment type.
equipmentType The equipment type to look for an empty slot for.
Checks if the given item is equipped on this entity.
item The potentially equipped item to check.
Returns the damage value after being negated by the armour value of this entity.
damage The incoming damage value.