示例#1
0
 public static void SetSlotWeaponData(this PlayerWeaponBagSetComponent component, int bagIndex, EWeaponSlotType nowSlot, EntityKey weaponKey)
 {
     if (bagIndex < 0)
     {
         bagIndex = component.HeldBagPointer;
     }
     component[bagIndex][nowSlot].Sync(weaponKey);
 }
示例#2
0
        public static void SetHeldSlotIndex(this PlayerWeaponBagSetComponent component, int bagIndex, int nowSlot)
        {
            var bag = component[bagIndex];

            if (bag.HeldSlotPointer == nowSlot)
            {
                return;
            }
            if (!WeaponUtil.VertifyEweaponSlotIndex(nowSlot, true))
            {
                return;
            }
            bag.ChangeSlotPointer(nowSlot);
        }
示例#3
0
 public static void SetSlotWeaponData(this PlayerWeaponBagSetComponent component, int bagIndex, EWeaponSlotType nowSlot, EntityKey weaponKey)
 {
     component[bagIndex][nowSlot].Sync(weaponKey);
 }
示例#4
0
 public static EntityKey GetHeldSlotEntityKey(this PlayerWeaponBagSetComponent component)
 {
     return(component.HeldBagContainer.HeldSlotData.WeaponKey);
 }
示例#5
0
 public static EntityKey GetSlotDataKey(this PlayerWeaponBagSetComponent component, EWeaponSlotType slot)
 {
     return(component.HeldBagContainer[slot].WeaponKey);
 }
示例#6
0
 public static WeaponBagSlotData GetSlotData(this PlayerWeaponBagSetComponent component, EWeaponSlotType slot)
 {
     return(component.HeldBagContainer[slot]);
 }
示例#7
0
 //    switch (slotType)
 //    {
 //        case EWeaponSlotType.MeleeWeapon:
 //        case EWeaponSlotType.PrimeWeapon:
 //        case EWeaponSlotType.SubWeapon:
 //        case EWeaponSlotType.TacticWeapon:
 //            return true;
 //        default:
 //            return false;
 //    }
 //}
 public static WeaponBagSlotData GetSlotData(this PlayerWeaponBagSetComponent compoennt)
 {
     return(compoennt.HeldBagContainer.HeldSlotData);
 }
示例#8
0
 public static bool IsSlotEmpty(this PlayerWeaponBagSetComponent component, EWeaponSlotType slot)
 {
     return(component.HeldBagContainer[slot].IsEmpty);
 }
示例#9
0
 public static bool IsHeldSlotEmpty(this PlayerWeaponBagSetComponent component)
 {
     return(component.HeldBagContainer.HeldSlotData.IsEmpty);
 }