You've already forked taptap2024_GJ_chidouren
init
This commit is contained in:
28
Assets/Scripts/System/AudioManagerExpend.cs
Normal file
28
Assets/Scripts/System/AudioManagerExpend.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.AudioHandler;
|
||||
using Coffee.UIEffects;
|
||||
using Framework.Audio;
|
||||
|
||||
namespace System
|
||||
{
|
||||
public static class AudioManagerExpend
|
||||
{
|
||||
public const string NormalBtnSound = "click_Snappy";
|
||||
public const string WarBtnSound = "tick";
|
||||
|
||||
// public static void PlayBtnSound(this AudioManager audioManager, float volume = 1) => audioManager.PlaySound(NormalBtnSound, volume);
|
||||
// public static void PlayWarBtnSound(this AudioManager audioManager, float volume = 1) => audioManager.PlaySound(WarBtnSound, volume);
|
||||
|
||||
public static AudioTrack PlaySoundEffect(this AudioManager audioManager, SeAudio seAudio, float volume = 1,float inTime = 0,bool loop = false)
|
||||
{
|
||||
if(seAudio!=SeAudio.None)
|
||||
return audioManager.PlaySound(AudioCode.Instance.GetSeAudio (seAudio), volume,inTime,loop);
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void PlayBGM(this AudioManager audioManager,BgmAudio bgmAudio,float volume = 1, float inTime = 0.5f, bool isLoop = true)
|
||||
{
|
||||
if (bgmAudio!=BgmAudio.None)
|
||||
audioManager.PlayBGM(AudioCode.Instance.GetBgmAudio (bgmAudio) , volume, inTime, isLoop);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user