public WeaponTags(WeaponType aWeaponType, WeaponDistance aWeaponDistance, int aDmgMin, int aDmgMax, int aArmorPenetration, int aCritChance, int aCritMulti, AttackTags aAttackTags1, AttackTags aAttackTags2, AttackTags aAttackTags3) { armorPenetration = aArmorPenetration; critChance = aCritChance; critMulti = aCritMulti; dmgMax = aDmgMax; dmgMin = aDmgMin; weaponDistance = aWeaponDistance; weaponType = aWeaponType; attack1 = aAttackTags1; attack2 = aAttackTags2; attack3 = aAttackTags3; }
public bool SelectWeapon(WeaponType weaponType) { var temp = currentWeapon; foreach (var weapon in weapons) { if (weapon.Weapon.WeaponType == weaponType) { temp = weapon; break; } } if (temp != null && !currentWeapon.Weapon.IsAttack) { currentWeapon.Weapon.WeaponObject.SetActive(false); currentWeapon = temp; currentWeapon.Weapon.WeaponObject.SetActive(true); return(true); } return(false); }
public void AddWeapon(WeaponDistance weapon) { weapons.Add(weapon); weapon.Weapon.WeaponObject.SetActive(false); }
private void Start() { currentWeapon = weapons[0]; }