Example #1
0
 public void Start()
 {
     equipmentSlotManager = GetComponentInParent <EquipmentSlotManager>();
     characterStats       = GetComponentInParent <CharacterStats>();
     modHandler           = GetComponentInParent <EquipmentModifiersHandler>();
     inventoryHandler     = GetComponentInParent <InventoryHandler>();
 }
 public void Awake()
 {
     foreach (EquipableItem item in items)
     {
         item.Init();
     }
     inventoryHandler = GetComponent <InventoryHandler>();
 }
Example #3
0
 private void Awake()
 {
     playerTransform   = GetComponent <Transform>();
     inventoryHandler  = GetComponent <InventoryHandler>();
     taticalMovement   = GetComponent <TaticalMovement>();
     characterStats    = GetComponent <CharacterStats>();
     stateManager      = GetComponent <CharacterStateManager>();
     skillSlotsHandler = GetComponent <SkillSlotsHandler>();
 }
Example #4
0
 // Start is called before the first frame update
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     playerTransform  = GetComponent <Transform>();
     inputHandler     = GetComponent <InputHandler>();
     inventoryHandler = GetComponent <InventoryHandler>();
 }
        public void Start()
        {
            inventoryHandler = GetComponent <InventoryHandler>();
            playerEquipment  = GetComponent <PlayerEquipment>();

            #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.amulet:
                    amuletSlot = equipmentHolderSlot;
                    break;

                case SlotType.quiver:
                    quiverSlot = equipmentHolderSlot;
                    break;
                }
            }
            #endregion

            #region Assign Equipment Item Slot on Inventory Menu
            InventorySlot[] equipedItems = EquipedItems.GetComponentsInChildren <InventorySlot>();
            foreach (InventorySlot equipedItem in equipedItems)
            {
                switch (equipedItem.slotType)
                {
                case SlotType.amulet:
                    EquipedAmulet = equipedItem;
                    break;

                case SlotType.gloves:
                    EquipedGloves = equipedItem;
                    break;

                case SlotType.leftHandSlot:
                    EquipedLeftHand = equipedItem;
                    break;

                case SlotType.rightHandSlot:
                    EquipedRightHand = equipedItem;
                    break;

                case SlotType.leggings:
                    EquipedLegging = equipedItem;
                    break;

                case SlotType.boots:
                    EquipedBoots = equipedItem;
                    break;

                case SlotType.helmet:
                    EquipedHelmet = equipedItem;
                    break;

                case SlotType.torso:
                    EquipedTorso = equipedItem;
                    break;
                }
            }
            #endregion
        }
Example #6
0
        public void Awake()
        {
            inventoryHandler = GetComponent <InventoryHandler>();

            EquipmentHolderSlot[] equipmentHolderSlots = GetComponentsInChildren <EquipmentHolderSlot>();
            foreach (EquipmentHolderSlot equipmentHolderSlot in equipmentHolderSlots)
            {
                switch (equipmentHolderSlot.slotType)
                {
                case "helmetSlot":
                    helmetSlot = equipmentHolderSlot;
                    break;

                case "gloveSlot":
                    gloveSlot = equipmentHolderSlot;
                    break;

                case "leggingSlot":
                    leggingSlot = equipmentHolderSlot;
                    break;

                case "torsoSlot":
                    torsoSlot = equipmentHolderSlot;
                    break;

                case "leftHandSlot":
                    leftHandSlot = equipmentHolderSlot;
                    break;

                case "rightHandSlot":
                    rightHandSlot = equipmentHolderSlot;
                    break;

                case "amuletSlot":
                    amuletSlot = equipmentHolderSlot;
                    break;

                case "bootSlot":
                    bootSlot = equipmentHolderSlot;
                    break;
                }
            }

            InventorySlot[] equipedItems = EquipedItems.GetComponentsInChildren <InventorySlot>();
            foreach (InventorySlot equipedItem in equipedItems)
            {
                switch (equipedItem.name)
                {
                case "Amulets":
                    EquipedAmulet = equipedItem;
                    break;

                case "Gloves":
                    EquipedGloves = equipedItem;
                    break;

                case "LeftHandEquip":
                    EquipedLeftHand = equipedItem;
                    break;

                case "RightHandEquip":
                    EquipedRightHand = equipedItem;
                    break;

                case "Leggings":
                    EquipedLegging = equipedItem;
                    break;

                case "Boots":
                    EquipedBoots = equipedItem;
                    break;

                case "Helmets":
                    EquipedHelmet = equipedItem;
                    break;

                case "Torso":
                    EquipedTorso = equipedItem;
                    break;
                }
            }
        }