37 lines
805 B
C#
37 lines
805 B
C#
using System.ComponentModel;
|
||
|
||
public partial class SROptions
|
||
{
|
||
[Category("音频")]
|
||
[DisplayName("音频ID")]
|
||
public int AudioID
|
||
{
|
||
set;
|
||
get;
|
||
}
|
||
|
||
[Category("音频")]
|
||
[DisplayName("播放音频")]
|
||
public async void Play()
|
||
{
|
||
int audioID = await AudioManager.Instance.PlayAudioOld(AudioID);
|
||
if (audioID < 0)
|
||
{
|
||
DebugUtil.LogError("Debug, Audio播放失败,请检查AudioID!");
|
||
}
|
||
}
|
||
|
||
[Category("音频")]
|
||
[DisplayName("停止背景音乐")]
|
||
public void StopBGM()
|
||
{
|
||
AudioManager.Instance.AudioMgrObj.StopBGM();
|
||
}
|
||
|
||
[Category("音频")]
|
||
[DisplayName("停止所有音频播放")]
|
||
public void StopAll()
|
||
{
|
||
AudioManager.Instance.AudioMgrObj.StopAll();
|
||
}
|
||
} |