Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public AudioClip[] audioClip;
- void PlaySound(int clip)
- {
- auio.clip = audioClip {clip};
- audio.Play ();
- }
- void OnTriggerLeftclick (Collider other)
- {
- audio.PlayOneShot(audioFile);
- }
- using UnityEngine;
- using System.Collections;
- public class PlayDoorSound : MonoBehaviour {
- public AudioClip weaponSound;
- public void PlayweaponnSound()
- {
- GetComponent<AudioSource>().PlayOneShot(weaponSound);
- Debug.Log("Weapon Sound Played!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement