public void ClearPedistool() { currentItemType = ItemType.Empty; currentArmourItem = null; currentWeaponItem = null; SetUIElements(); }
public void ClearPedistool() { currentItemType = ItemType.Empty; currentArmourItem = null; currentWeaponItem = null; currentConsumableItem = null; SetUIElements(); this.gameObject.GetComponent <BoxCollider2D>().enabled = false; }
public PlayerClass(float healthInput, float resistanceInput, float lightDamageInput, float heavyDamageInput, float attackRangeInput, float movementSpeedInput, int goldInput, WeaponsSO weaponInput, ArmourSO armourInput) { currentHealth = healthInput; currentLightDamage = lightDamageInput; currentHeavyDamage = heavyDamageInput; currentAttackRange = attackRangeInput; currentMovementSpeed = movementSpeedInput; currentGold = goldInput; currentWeapon = weaponInput; currentArmour = armourInput; }
public void PurchaseNewArmour(ArmourSO newArmour) { if (currentGold < newArmour.cost) { return; } else { currentGold -= newArmour.cost; currentArmour = newArmour; UpdateArmourStats(); } }
private void ChooseRandomItem() { switch (currentItemType) { case ItemType.Weapon: int chosenWeaponIndex = Random.Range(0, itemManager.allWeaponsArray.Length); currentWeaponItem = itemManager.allWeaponsArray[chosenWeaponIndex]; break; case ItemType.Armour: int chosenArmourIndex = Random.Range(0, itemManager.allArmourArray.Length); currentArmourItem = itemManager.allArmourArray[chosenArmourIndex]; break; default: break; } }