예제 #1
0
        private bool ClipRequirements(CharacterShooter shooter, bool subtract)
        {
            if (shooter.GetAmmoInClip(this.ammoID) > 0)
            {
                if (subtract)
                {
                    shooter.AddAmmoToClip(this.ammoID, -1);
                }
                return(true);
            }

            if (shooter.GetAmmoInStorage(this.ammoID) > 0 && this.autoReload)
            {
                shooter.StartCoroutine(shooter.Reload());
            }
            else
            {
                shooter.PlayAudio(this.audioEmpty);
            }

            return(false);
        }