public void Load() { if (isLoading) { return; } playerScoresContainer.SetActive(false); statusText.gameObject.SetActive(true); if (!FirestoreManager.isInitialized) { statusText.text = "Failed to load leaderboard"; return; } isLoading = true; statusText.text = "Loading..."; if (FirestoreManager.isAuthenticated) { FirestoreManager.SendRecord(task => { LoadLeaderboard(); }); } else { LoadLeaderboard(); } }
public void Load() { Screen.sleepTimeout = SleepTimeout.NeverSleep; if (DataManager.isLocalTestMode || Application.internetReachability == NetworkReachability.NotReachable) { DataManager.LocalLoad(); LevelsManager.LoadStartMenuStatic(); return; } InitializeServices(); GooglePlayAuth((succes) => { FirestoreAuth(task => { if (task.IsCompleted) { FirestoreManager.SendRecord(null); } }); LoadSaves(); }); StartCoroutine(LoadStartMenu()); }