You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
724 B

using UnityEngine;
public static class GlobalAudioPlayer {
public static BeatEmUpTemplate.AudioPlayer audioPlayer;
public static void PlaySFX(string sfxName){
if(audioPlayer != null && sfxName != "") audioPlayer.playSFX(sfxName);
}
public static void PlaySFXAtPosition(string sfxName, Vector3 position){
if(audioPlayer != null && sfxName != "") audioPlayer.playSFXAtPosition(sfxName, position);
}
public static void PlaySFXAtPosition(string sfxName, Vector3 position, Transform parent){
if(audioPlayer != null && sfxName != "") audioPlayer.playSFXAtPosition(sfxName, position, parent);
}
public static void PlayMusic(string musicName){
if(audioPlayer != null) audioPlayer.playMusic(musicName);
}
}