public void Start() { equipmentSlotManager = GetComponentInParent <EquipmentSlotManager>(); characterStats = GetComponentInParent <CharacterStats>(); modHandler = GetComponentInParent <EquipmentModifiersHandler>(); inventoryHandler = GetComponentInParent <InventoryHandler>(); }
private void Start() { equipmentSlotManager = GetComponentInChildren <EquipmentSlotManager>(); foreach (InventorySlot itemSlot in equipmentSlotManager.equipedItems) { if (itemSlot.item != null) { equipmentSlotManager.LoadEquipmentOnSlot(itemSlot.item, itemSlot.item.slotType); } } }
private void Start() { equipmentSlotManager = GetComponentInChildren <EquipmentSlotManager>(); foreach (InventorySlot itemSlot in equipmentSlotManager.equipedItems) { if (itemSlot.item != null) { equipmentSlotManager.LoadEquipmentOnSlot(itemSlot.item, itemSlot.item.slotType); } } foreach (SkinnedMeshRenderer skinRenderer in characterEquipment.GetComponentsInChildren <SkinnedMeshRenderer>()) { baseMeshDict.Add(skinRenderer.gameObject.name, skinRenderer.sharedMesh); equipmentsMeshDict.Add(skinRenderer.gameObject.name, skinRenderer); } }
private void Initialize() { equipmentSlotManager = PlayerManager.instance.GetComponentInChildren <EquipmentSlotManager>(); }