Exemple #1
0
 // Primary Weapon Two Methods
 public void SetPrimaryWeaponTwo(CharacterInventoryItem _item, Action <bool> _action)
 {
     if (this.PrimaryWeaponTwo == null)
     {
         this.PrimaryWeaponTwo = _item;
         _action(true);
     }
     else
     {
         _action(false);
     }
 }
Exemple #2
0
 // Melee Weapon Methods
 public void SetMeleeWeapon(CharacterInventoryItem _item, Action <bool> _action)
 {
     if (this.MeleeWeapon == null)
     {
         this.MeleeWeapon = _item;
         _action(true);
     }
     else
     {
         _action(false);
     }
 }
Exemple #3
0
        // Regular Item Methods
        public void AddItem(CharacterInventoryItem _item, Action <bool> _action)
        {
            bool isSlotAvailable = false;
            int  slotAvailable   = 0;

            for (int a = 0; a < this.Items.Count; a++)
            {
                if (this.Items[a] == null && !isSlotAvailable)
                {
                    isSlotAvailable = true;
                    slotAvailable   = a;
                }
            }
            if (isSlotAvailable)
            {
                this.Items[slotAvailable] = _item;
                _action(true);
            }
            else
            {
                _action(false);
            }
        }
Exemple #4
0
 public void SetLootItem(CharacterInventoryItem _item)
 {
     this.Loot        = _item;
     this.isAvailable = true;
 }