public void HandleClick() { Helpers.songInfoName = songInfo.Name; Helpers.songInfoComposer = songInfo.Composer; Helpers.songInfoXmlId = songInfo.XmlId; Helpers.SongXmlCompressed = null; Helpers.HandFingerShow = HandFingerShow; panelIndicator.LoadLevel(3, "Loading song " + Helpers.songInfoName + "..."); }
void Start() { if (string.IsNullOrEmpty(Helpers.songInfoName) || Helpers.songInfoXmlId == -1) { if (LocalizationManager.instance != null) { panelIndicator.LoadLevel(2, LocalizationManager.instance.GetLocalizedValue("Loading song list") + "..."); } return; } ButtonInstrumentVoice.SetActive(false); if (LocalizationManager.instance != null) { panelIndicator.ShowIndicator(LocalizationManager.instance.GetLocalizedValue("Generating") + " " + Helpers.songInfoName + " - " + Helpers.songInfoComposer + "...", "GetScore Start"); } noteCreator = GetComponent <NoteCreator>(); Debug.Log("songInfoName " + Helpers.songInfoName + " songInfoComposer " + Helpers.songInfoComposer + " songInfoXmlId " + Helpers.songInfoXmlId); Helpers.Score = null; FirebaseApp.DefaultInstance.SetEditorDatabaseUrl("https://doremipiano-cee8a.firebaseio.com/"); FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task => { var dependencyStatus = task.Result; if (dependencyStatus == DependencyStatus.Available) { // Set a flag here indiciating that Firebase is ready to use by your // application. InitializeFirebase(); } else { Debug.LogError(String.Format( "Could not resolve all Firebase dependencies: {0}", dependencyStatus)); // Firebase Unity SDK is not safe to use here. } }); Invoke("GetSongDataTimeOut", 15); }
IEnumerator Start() { Screen.sleepTimeout = (int)SleepTimeout.NeverSleep; Application.targetFrameRate = 60; if (string.IsNullOrEmpty(PlayerPrefs.GetString("language"))) { if (Application.systemLanguage == SystemLanguage.ChineseSimplified) { PlayerPrefs.SetString("language", "localizedText_zh-Hans.json"); } else if (Application.systemLanguage == SystemLanguage.ChineseTraditional || Application.systemLanguage == SystemLanguage.Chinese) { PlayerPrefs.SetString("language", "localizedText_zh-Hant.json"); } else if (Application.systemLanguage == SystemLanguage.Japanese) { PlayerPrefs.SetString("language", "localizedText_ja.json"); } else if (Application.systemLanguage == SystemLanguage.Vietnamese) { PlayerPrefs.SetString("language", "localizedText_vi.json"); } else { PlayerPrefs.SetString("language", "localizedText_en.json"); } } LocalizationManager.instance.LocalizationManagerIsReady = false; yield return(LocalizationManager.instance.LoadLocalizedText(PlayerPrefs.GetString("language"))); while (!LocalizationManager.instance.LocalizationManagerIsReady) { yield return(null); } panelIndicator.LoadLevel(1, "Loading Play Mode..."); }