23 lines
478 B
C#
23 lines
478 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.PlayAudio(AudioID);
|
|||
|
|
if (audioID < 0)
|
|||
|
|
{
|
|||
|
|
DebugUtil.LogError("Debug, Audio播放失败,请检查AudioID!");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|