示例#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;
 }
示例#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;
 }
示例#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();
     }
 }