Exemple #1
0
    private void SwitchMusicTheme()
    {
        if (!AkSoundEngine.IsInitialized())
        {
            m_logger.Error("Error_EngineNotInit");
            return;
        }

        ms_nextMusicThemeName = gameObject.name;
        m_logger.Info("Prog_SwitchMusic", ms_nextMusicThemeName);
        uint musicEvent = m_eventDict[ms_nextMusicThemeName];

        AkSoundEngine.PostEvent(musicEvent, gameObject);
    }
Exemple #2
0
    private void SwitchLanguage()
    {
        if (!AkSoundEngine.IsInitialized())
        {
            m_logger.Error("Error_EngineNotInit");
            return;
        }

        string language = m_languageDict[gameObject.name];

        AkSoundEngine.SetCurrentLanguage(language);

        IntPtr in_pInMemoryBankPtr = IntPtr.Zero;

        AkSoundEngine.UnloadBank(m_BankName, in_pInMemoryBankPtr);
        uint bankID;

        AkSoundEngine.LoadBank(m_BankName, AkSoundEngine.AK_DEFAULT_POOL_ID, out bankID);
        m_logger.Info("Prog_SwitchLanguage", language);
    }