Beispiel #1
0
        public override void PlaySound(int ID)
        {
            if (ID > Sounds.Length - 1)
            {
                return;
            }

            if (Sounds[ID] != null && WeaponSound != null)
            {
                if (WeaponSound.isPlaying)
                {
                    WeaponSound.Stop();
                }

                if (ID == 2)                                    //THIS IS THE SOUND FOR BEND THE BOW
                {
                    WeaponSound.pitch = 1.03f / HoldTime;
                    StartCoroutine(BowHoldTimePlay(ID));
                }
                else
                {
                    WeaponSound.pitch = 1;
                    WeaponSound.PlayOneShot(Sounds[ID]);   //Play Draw/ Weapon Clip
                }
            }
        }
Beispiel #2
0
        IEnumerator BowHoldTimePlay(int ID)
        {
            while (BowTension == 0)
            {
                yield return(null);
            }

            WeaponSound.PlayOneShot(Sounds[ID]);
        }