Пример #1
0
 private void OnClick()
 {
     if (ResourcesConfigManager.GetIsExitRes(audioName))
     {
         AudioPlayManager.PlaySFX2D(audioName, volume);
     }
     else
     {
         Debug.LogError("不存在音频文件:" + audioName);
     }
 }
Пример #2
0
 static int PlaySFX2D(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 5);
         string arg0 = ToLua.CheckString(L, 1);
         float  arg1 = (float)LuaDLL.luaL_checknumber(L, 2);
         float  arg2 = (float)LuaDLL.luaL_checknumber(L, 3);
         float  arg3 = (float)LuaDLL.luaL_checknumber(L, 4);
         string arg4 = ToLua.CheckString(L, 5);
         AudioPlayManager.PlaySFX2D(arg0, arg1, arg2, arg3, arg4);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #3
0
 private static void PlaySFXData(SFXPlayData data)
 {
     AudioPlayManager.PlaySFX2D(data.name, data.volume, data.delay, data.pitch);
 }
 private void OnClick()
 {
     AudioPlayManager.PlaySFX2D(audioName, volume);
 }