コード例 #1
0
    protected void Fire()
    {
        if (Input.GetMouseButton(0))
        {
            if (_delay < 0 && _canShoot)
            {
                _timeSinceLastShoot = Time.time;
                BulletSpawn(_bulletsToShoot);
                _source.Play();
                _delay = _shootDelay;
                _bulletsShooted++;

                CameraAnimator.ShakeCamera();
                _animator.SetTrigger("Shoot");
            }
        }
    }