GiveAmmo() public method

public GiveAmmo ( ) : bool
return bool
示例#1
0
        protected virtual void Reload(Actor self, int reloadDelay, int reloadCount, string sound)
        {
            if (!ammoPool.FullAmmo() && --remainingTicks == 0)
            {
                remainingTicks = reloadDelay;
                if (!string.IsNullOrEmpty(sound))
                {
                    Game.Sound.PlayToPlayer(SoundType.World, self.Owner, sound, self.CenterPosition);
                }

                ammoPool.GiveAmmo(self, reloadCount);
            }
        }
示例#2
0
        protected virtual void Reload(Actor self, int reloadDelay, int reloadCount, string sound)
        {
            if (!ammoPool.HasFullAmmo && --remainingTicks == 0)
            {
                remainingTicks = Util.ApplyPercentageModifiers(reloadDelay, modifiers.Select(m => m.GetReloadAmmoModifier()));
                if (!string.IsNullOrEmpty(sound))
                {
                    Game.Sound.PlayToPlayer(SoundType.World, self.Owner, sound, self.CenterPosition);
                }

                ammoPool.GiveAmmo(self, reloadCount);
            }
        }