private void LoadSongList() { var listSongTextAsset = CAssetBundleManager.LoadResourceOrBundle <TextAsset> ("List-song"); var listSong = CSVUtil.ToObject <CSongData> (listSongTextAsset.text); var saveListSongs = CTaskUtil.REFERENCES [CTaskUtil.LIST_SONG] as List <CSongData>; for (int i = 0; i < listSong.Count; i++) { var data = listSong [i]; saveListSongs.Add(data); } }
protected virtual void StartGame() { this.m_AudioSource.clip = this.m_AudioClip; this.m_AudioBackground.transform.SetParent(this.m_RootBackgroundImage.transform); var rectAudioBG = this.m_AudioBackground.transform as RectTransform; rectAudioBG.anchoredPosition = Vector2.zero; rectAudioBG.sizeDelta = Vector2.zero; this.m_AudioSource.Play(); this.m_ListNodeData = CSVUtil.ToObject <CNodeData> (this.m_AudioTextAsset.text); this.m_IsAssetsAlready = true; }
private void LoadLanguageCode() { var laPath = CAssetBundleManager.LoadResourceOrBundle <TextAsset> ("la_Path"); var listLanguages = CSVUtil.ToObject <CLanguageData> (laPath.text); var saveListLanguages = CTaskUtil.REFERENCES [CTaskUtil.LA_DISPLAY] as List <CLanguageData>; var distLanguage = CTaskUtil.REFERENCES [CTaskUtil.LA] as Dictionary <string, Dictionary <string, string> >; for (int i = 0; i < listLanguages.Count; i++) { var laData = listLanguages [i]; var transPath = CAssetBundleManager.LoadResourceOrBundle <TextAsset> (laData.laFile); var transData = CSVUtil.ToObject <CTranslateData> (transPath.text); distLanguage [laData.laName] = new Dictionary <string, string> (); saveListLanguages.Add(laData); for (int x = 0; x < transData.Count; x++) { var data = transData [x]; distLanguage [laData.laName] [data.transCode] = data.transDisplay; } } }