コード例 #1
0
 public void Collide(GameObject other)
 {
     if (sfxCollect != null)
     {
         sfxCollect.PlayAtSource(other.GetComponent <AudioSource>());
     }
     other.GetComponent <PlayerView>().PlayPulse();
     Destroy(gameObject);
 }
コード例 #2
0
 private void PlaySound(SoundClip clip, float volume = 1f, float panOffset = 0f, float pitchOffset = 0f)
 {
     clip.PlayAtSource(Audio, volume, panOffset, pitchOffset);
 }