SoundController.SoundManager.GetGunSound C# (CSharp) Method

GetGunSound() public method

public GetGunSound ( int index ) : AudioClip
index int
return UnityEngine.AudioClip
        public AudioClip GetGunSound(int index)
        {
            return NullTest(gunshots, index);
        }

Usage Example

Exemplo n.º 1
0
        // Use this for initialization
        void Start()
        {
            _ammoCount = 6;
            _firing = false;
            _reloading = false;
            _reloadTimer = 1;
            gunBarrelAnimator.enabled = false;
            //We start by spawning 6 bullets in.
            _bulletsArrayNav = 6;
            SpawnBullets();
            //Then we only want 0 to spawn.
            _bulletsArrayNav = 0;

            _soundManager = GameObject.Find ("SoundManager").GetComponent<SoundManager> ();
            gunShot.clip = _soundManager.GetGunSound(0);
        }
All Usage Examples Of SoundController.SoundManager::GetGunSound