public void Init(Messenger msg)
        {
            this.msg              = msg;
            curLang               = -1;
            mUnloadPrefab         = new MUnloadPrefab();
            mLoadedPrefab         = new MLoadedPrefab();
            mUnloadAudio          = new MUnloadAudio();
            mLoadedAudio          = new MLoadedAudio();
            mLanguageAssetsLoaded = new MLanguageAssetsLoaded();
            mLanguageLoaded       = new MLanguageLoaded();
            prefabs               = new GameObject[prefabKeys.Length];
            audioClips            = new AudioClip[audioKeys.Length];
            prefabRequests        = new ResourceRequest[prefabKeys.Length];
            audioRequests         = new ResourceRequest[audioKeys.Length];

            msg.AddListener <MLoadLanguage>(OnLoadLanguage);
        }
예제 #2
0
 private void OnLoadedLang(MLanguageAssetsLoaded languageAssetsLoaded)
 {
     onSwitchedLanguage.Invoke(languageAssetsLoaded.language);
 }