コード例 #1
0
        /// <summary>
        /// Do shoot.
        /// </summary>
        protected virtual void DoShoot()
        {
            if (spreadProperties != null)
            {
                spreadProperties.ApplySpread(weaponAnimator.GetActiveState());
            }

            switch (bulletType)
            {
            case BulletType.RayBullet:
                RayBulletShootingProcess();
                break;

            case BulletType.PhysicsBullet:
                PhysicsBulletShootingProcess();
                break;
            }

            AudioClip sound = soundProperties.GetRandomFireSound();

            if (sound != null)
            {
                audioSource.PlayOneShot(sound);
            }

            weaponReloading.BulletSubtraction();
            AttackParticleEffect();

            if (spreadProperties != null)
            {
                spreadProperties.ResetRotation();
            }
        }