Beispiel #1
0
 private void Awake()
 {
     this.m_gameData              = Singleton <GameManager> .Instance.gameData;
     GameProgress.instance        = this;
     GameProgress.m_currentPlayer = null;
     GameProgress.ChangePlayer(string.Empty);
     UnityEngine.Object.DontDestroyOnLoad(this);
     EventManager.Connect(new EventManager.OnEvent <LoadLevelEvent>(this.ReceiveLoadingLevelEvent));
     HatchManager.onLogout       = (Action)Delegate.Combine(HatchManager.onLogout, new Action(this.OnLogoutActions));
     GameProgress.EnableAutoSave = true;
 }
Beispiel #2
0
 private void OnLoginError(ErrorType errorType, string message)
 {
     this.InitPlayer(false);
     if (errorType == HatchManager.ErrorType.NoNetwork)
     {
         GameProgress.ChangePlayer(PlayerPrefs.GetString("offline_game_progress", string.Empty));
     }
     if (HatchManager.onLoginFailed != null)
     {
         HatchManager.onLoginFailed();
     }
     HatchManager.m_hasLoginError = true;
 }
Beispiel #3
0
 private void PlayerIsReady()
 {
     if (Singleton <PlayFabManager> .Instance.IsSendingChunkCache)
     {
         EventManager.Connect(new EventManager.OnEvent <PlayFabEvent>(this.OnPlayFabEvent));
         return;
     }
     GameProgress.ChangePlayer(string.Empty);
     PlayerPrefs.SetString("offline_game_progress", string.Empty);
     HatchManager.m_isLoggedIn = true;
     if (HatchManager.onLoginSuccess != null)
     {
         HatchManager.onLoginSuccess();
     }
 }