public void Start() { #region Assign Equipment Holder Slots On Character Model EquipmentHolderSlot[] equipmentHolderSlots = GetComponentsInChildren<EquipmentHolderSlot>(); foreach (EquipmentHolderSlot equipmentHolderSlot in equipmentHolderSlots) { switch (equipmentHolderSlot.slotType) { case SlotType.leftHandSlot: leftHandSlot = equipmentHolderSlot; break; case SlotType.rightHandSlot: rightHandSlot = equipmentHolderSlot; break; case SlotType.quiver: quiverSlot = equipmentHolderSlot; break; } } #endregion modHandler = GetComponent<EquipmentModifiersHandler>(); characterStats = GetComponent<CharacterStats>(); foreach (EquipableItem item in Equipments) EquipItem(item); }
public void Start() { equipmentSlotManager = GetComponentInParent <EquipmentSlotManager>(); characterStats = GetComponentInParent <CharacterStats>(); modHandler = GetComponentInParent <EquipmentModifiersHandler>(); inventoryHandler = GetComponentInParent <InventoryHandler>(); }