// Primary Weapon Two Methods public void SetPrimaryWeaponTwo(CharacterInventoryItem _item, Action <bool> _action) { if (this.PrimaryWeaponTwo == null) { this.PrimaryWeaponTwo = _item; _action(true); } else { _action(false); } }
// Melee Weapon Methods public void SetMeleeWeapon(CharacterInventoryItem _item, Action <bool> _action) { if (this.MeleeWeapon == null) { this.MeleeWeapon = _item; _action(true); } else { _action(false); } }
// 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); } }
public void SetLootItem(CharacterInventoryItem _item) { this.Loot = _item; this.isAvailable = true; }