Class EquipmentSystem
Handles the equipment stored inside an instance of CharacterData. Will take care of unequipping the previous
item when equipping a new one in the same slot.
Inheritance
System.Object
EquipmentSystem
Assembly: Assembly-CSharp.dll
Syntax
public class EquipmentSystem
Properties
OnEquiped
Declaration
public Action<EquipmentItem> OnEquiped { get; set; }
Property Value
OnUnequip
Declaration
public Action<EquipmentItem> OnUnequip { get; set; }
Property Value
Weapon
Declaration
public Weapon Weapon { get; }
Property Value
Methods
Equip(EquipmentItem)
Equip the given item for the given user. This won't check about requirement, this should be done by the
inventory before calling equip!
Declaration
public void Equip(EquipmentItem item)
Parameters
GetItem(EquipmentItem.EquipmentSlot)
Declaration
public EquipmentItem GetItem(EquipmentItem.EquipmentSlot slot)
Parameters
Returns
Init(CharacterData)
Declaration
public void Init(CharacterData owner)
Parameters
InitWeapon(Weapon, CharacterData)
Declaration
public void InitWeapon(Weapon wep, CharacterData data)
Parameters
Unequip(EquipmentItem.EquipmentSlot, Boolean)
Unequip the item in the given slot. isReplacement is used to tell the system if this unequip was called
because we equipped something new in that slot or just unequip to empty slot. This is for the weapon : the
weapon slot can't be empty, so if this is not a replacement, this will auto-requip the base weapon.
Declaration
public void Unequip(EquipmentItem.EquipmentSlot slot, bool isReplacement = false)
Parameters