コード例 #1
0
        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 OnLoadedAudio(MLoadedAudio loaded)
 {
     onLoadedAudio.Invoke(loaded.clip, loaded.index);
 }