public bool HasGun(WeaponSide side, string weaponName) { InventorySlot[] weapons = side == WeaponSide.Left ? leftWeapons : rightWeapons; for (int i = 0; i < weapons.Length; i++) { if (weapons[i].Occupied && weapons[i].GetWeaponIfExists().name == weaponName) { return true; } } return false; }
public Weapon(string objectType, string wName, string wDescription, int wATK, int wMagicATK, int wATKspeed, int wDEF, int wMagicDEF, WeaponType weaponType, WeaponSide wSide, int wSpace) { this.objectType = objectType; this.wName = wName; this.wDescription = wDescription; this.wATK = wATK; this.wMagicATK = wMagicATK; this.wATKspeed = wATKspeed; this.wDEF = wDEF; this.wMagicDEF = wMagicDEF; this.weaponType = weaponType; this.wSide = wSide; this.wSpace = wSpace; //primary = false; }