internal void OnCompletedUnityUserTask(Task <UnityUser> task) { if (task.IsFaulted) { Debug.LogError($"Get User Info failed: {task.Exception}"); authenticationFailed?.Invoke(task.Exception.ToString()); } else { var user = task.Result; if (DateTime.UtcNow > user.SessionExpiry - s_SessionExpiryThreshold && Application.internetReachability != NetworkReachability.NotReachable) { Debug.LogWarning($"User token about to expire, force login"); authenticationFailed?.Invoke("Token expired"); } else { m_User = user; userLoggedIn?.Invoke(m_User); } } m_UnityUserTask = null; }
void FailMission() { #if FULLLOG MoreDebug.Log("go: " + gameObject.name); #endif if (!isActive) { return; } #if FULLLOG MoreDebug.Log("real."); #endif if (!PauseGame.exists) { #if FULLLOG MoreDebug.Log("No PauseGame -----"); #endif } if (InfoPriority > operation.MissionTerseness) { MessageBoxParams parms = new MessageBoxParams(); parms.Message = FailureInfo; parms.MessageBoxTitle = MissionTitle; parms.Button1Action = PauseGame.only.queueResume; parms.MultipleCallBehaviour = MultipleCallBehaviours.Queue; EasyMessageBox.Show(parms); PauseGame.only.queuePause(); } currentState = GoalManager.GoalState.reallose; FailureEvent.Invoke(); operation.LoseMission(); isActive = false; //Reset (); }
void FailGoal() { #if FULLLOG MoreDebug.Log("go: " + gameObject.name); #endif // do stuff currentState = GoalState.reallose; FailureEvent.Invoke(); CleanUp(); }
public void OnClickFailureButton() { onFailure.Invoke(_quest, _progress); gameObject.SetActive(false); }