示例#1
0
 private void EquipEquipment(Equipment_Slot slot, Item theItem)
 {
     if (slot.GetEquipmentSlotType() == EquipmentSlotType.RHWeapon)
     {
         EquipRightHand(theItem);
     }
     if (slot.GetEquipmentSlotType() == EquipmentSlotType.BodyArmour)
     {
         print("Equiping some arrmor... Come on program it!!!");
     }
 }
示例#2
0
 public Item WhichItemInSlot(Equipment_Slot slot)
 {
     if (slot.GetEquipmentSlotType() == EquipmentSlotType.RHWeapon)
     {
         return(rightHand);
     }
     if (slot.GetEquipmentSlotType() == EquipmentSlotType.BodyArmour)
     {
         return(bodyArmor);
     }
     return(null);
 }
示例#3
0
 public void EquipEquipmentInSlot(Item theItem, Equipment_Slot slot) // Equips in the correct slot // FOR ADDING NEW EQUIPMENTSLOTS
 {
     if (slot.GetEquipmentSlotType() == EquipmentSlotType.RHWeapon)
     {
         EquipRightHand(theItem);
     }
     if (slot.GetEquipmentSlotType() == EquipmentSlotType.BodyArmour)
     {
         //equipBodyArmour(theItem.GetItemBodyArmour());
         EquipBodyArmour(theItem);
     }
     restartAnimationEvent();
 }
示例#4
0
 public void UnEquipSlot(Equipment_Slot slot)
 {
     if (slot.GetEquipmentSlotType() == EquipmentSlotType.RHWeapon)
     {
         UnEquipRightHand();
     }
     else
     {
         Debug.LogError("Slot type not supported");
     }
     restartAnimationEvent();
 }
示例#5
0
 private bool EquipmentSlotFree(Equipment_Slot equipmentSlot)
 {
     if (equipmentSlot.GetEquipmentSlotType() == EquipmentSlotType.RHWeapon)
     {
         if (rightHand == false) // FIND IF THE RIGHT HAND SLOT IS EMPY THEN RIGHT ALL THE OTHER SLOTS IF THEY ARE EMPTY
         {
             return(true);
         }
         return(false);
     }
     //add others equipment slots here
     Debug.LogError("EQUIPMENTSLOT FREE CHECK OUT OF BOUNDS");
     return(false);
 }
示例#6
0
        public bool DoesEquipmentMatchSlot(Item theItem, Equipment_Slot slot) // Checks to see if the equipment matches the slot
        {
            if (theItem != null)
            {
                if (theItem.GetItemWeapon() != null || theItem.GetItemBodyArmour() != null) // FOR ADDING NEW EQUIPMENTSLOTS
                {
                    print("Ready to put weapon in slot");
                    if (slot.GetEquipmentSlotType() == theItem.GetEquipmentSlotType()) // TODO PROGRAM THIS SO IT CAN LOOK AT THE SLOT AND THE WEAPON
                    {
                        print("Equip equipment");
                        return(true);
                    }

                    Debug.LogError("Wrong slot type");
                    return(false);
                }
                Debug.LogWarning("No weapon");
                return(false);
            }
            print("no item");
            return(false);
        }
示例#7
0
 private EquipmentSlotType WhichEquipmentSlot(Equipment_Slot theSlot)
 {
     return(theSlot.GetEquipmentSlotType());
 }