Exemplo n.º 1
0
        protected override void Shooting()
        {
            if (CurrentAmmo <= 0)
            {
                return;
            }
            if (!IsAllowShooting())
            {
                return;
            }
            MuzzleParticle.Play();
            CurrentAmmo -= 1;

            GunAnimator.Play("Fire", IsAiming ? 1 : 0, 0);

            FirearmsShootingAudioSource.clip = FirearmsAudioData.ShootingAudio;
            FirearmsShootingAudioSource.Play();

            CreateBullet();
            CasingParticle.Play();
            if (mouseLook)
            {
                mouseLook.FiringForTest();
            }
            LastFireTime = Time.time;
        }
Exemplo n.º 2
0
 protected override void Shooting()
 {
     if (CurrentAmmo <= 0)
     {
         return;
     }
     if (!IsAllowShooting())
     {
         return;
     }
     MuzzleParticle.Play();
     CurrentAmmo -= 1;
     GunAnimator.Play("Fire", 0, 0);
     CasingParticle.Play();
     LastFireTime = Time.time;
 }
Exemplo n.º 3
0
 protected override void Shooting()
 {
     if (CurrentAmmo <= 0)
     {
         return;
     }
     if (!IsAllowShooting())
     {
         return;
     }
     MuzzleParticle.Play();
     CurrentAmmo -= 1;
     GunAnimator.Play(stateName: "Fire", layer: 0, normalizedTime: 0);
     CreateBullet();
     CasingParticle.Play();
     LastFireTime = Time.time;
 }