public override void NotifyItemEquipped(EquippableSlot equipSlot, uint amountEquipped) { base.NotifyItemEquipped(equipSlot, amountEquipped); uConstructInventoryPlacer placer = PlayerManager.instance.currentPlayer.transform.GetComponentInParent <uConstructInventoryPlacer>(); if (placer == null) { Debug.LogError("uConstruct Inventory placer cant be found on the player!"); return; } placer.onEquip(building, this); }
public override void NotifyItemUnEquipped(ICharacterCollection equipTo, uint amountUnEquipped) { if (isEquipped) { uConstructInventoryPlacer placer = PlayerManager.instance.currentPlayer.transform.GetComponentInParent <uConstructInventoryPlacer>(); if (placer == null) { Debug.LogError("uConstruct Inventory placer cant be found on the player!"); return; } placer.onDeEquip(); } base.NotifyItemUnEquipped(equipTo, amountUnEquipped); }