コード例 #1
0
 void playEmptySound()
 {
     AudioSourceManager.PlayAudioOneShot(sprayEmpty.GetAudioClip(),
                                         sprayEmpty.GetVolume(),
                                         sprayEmpty.GetPitch(),
                                         sprayEmpty.GetSpatialBlend());
 }
コード例 #2
0
 void onCollectablePickedup(CollectablePickedupEvent collectablePickedup)
 {
     AudioSourceManager.PlayAudioOneShot(collectableSFX.GetAudioClip(),
                                         collectableSFX.GetVolume(),
                                         collectableSFX.GetPitch(),
                                         collectableSFX.GetSpatialBlend());
 }
コード例 #3
0
 private void playSoundEffect()
 {
     AudioSourceManager.PlayAudioOneShot(soundEffect.GetAudioClip(),
                                         soundEffect.GetVolume(),
                                         soundEffect.GetPitch(),
                                         soundEffect.GetSpatialBlend());
 }
コード例 #4
0
 // Start is called before the first frame update
 void Start()
 {
     alarmResetSound          = FindObjectOfType <SoundEffectManager>().GetSoundEffect(GeneralVariables.SFX.ALARM_RESET);
     audioSource              = gameObject.AddComponent <AudioSource>();
     audioSource.volume       = alarmResetSound.GetVolume();
     audioSource.pitch        = alarmResetSound.GetPitch();
     audioSource.spatialBlend = alarmResetSound.GetSpatialBlend();
 }
コード例 #5
0
    public void AddLetterToTextField()
    {
        scaleAnimation.PlayAnimation();
        audioSource.PlayOneShot(soundEffect.GetAudioClip(), soundEffect.GetVolume());

        if (textField.text.Length < inputLimit)
        {
            textField.text += key;
        }
    }
コード例 #6
0
 void onGameOver(GameOverEvent gameOverEvent)
 {
     if (!gameOverEvent.IsCompleted)
     {
         AudioSourceManager.PlayAudioOneShot(
             gameOverSound.GetAudioClip(),
             gameOverSound.GetVolume(),
             gameOverSound.GetPitch(),
             gameOverSound.GetSpatialBlend());
     }
 }
コード例 #7
0
 public void PlayButtonSound()
 {
     AudioSourceManager.PlayAudioOneShot(soundEffect.GetAudioClip(), soundEffect.GetVolume(),
                                         soundEffect.GetPitch(), soundEffect.GetSpatialBlend());
 }