Assets.Scripts.Player.PlayerAmmo.AddAmmo C# (CSharp) Method

AddAmmo() public method

public AddAmmo ( AmmoType ammoType, int amount ) : void
ammoType AmmoType
amount int
return void
        public void AddAmmo(AmmoType ammoType, int amount)
        {
            if (_ammo.ContainsKey(ammoType))
            {
                _ammo[ammoType] += amount;
            }
            else
            {
                _ammo.Add(ammoType, amount);
            }
        }