Beispiel #1
0
        private void Awake()
        {
            Level instanceLevel = CrossSceneLevelContainer.Instance.level;

            if (instanceLevel != null)
            {
                currentWorkingLevel = instanceLevel;
                Debug.Log("Loading Level...");
                LoadCurrentLevelIntoEditor();
            }
            else
            {
                Debug.Log("creating new level...");
                currentWorkingLevel = new Level(DEFAULT_LEVEL_NAME,
                                                FirebaseAuthManager.GetDisplayName(),
                                                FirebaseAuthManager.Instance.User.UserId);
            }
            identity = Quaternion.identity;
        }
Beispiel #2
0
 public static string AuthStatusToMessage(FirebaseAuthManager.AuthStatus authStatus)
 {
     return(authStatus switch
     {
         FirebaseAuthManager.AuthStatus.LoggingIn => "LOGGING IN",
         FirebaseAuthManager.AuthStatus.Registering => "REGISTERING",
         FirebaseAuthManager.AuthStatus.WaitingForUser => "PLEASE REGISTER/LOGIN BELOW:",
         FirebaseAuthManager.AuthStatus.RegisterCanceled => "REGISTER WAS CANCELED",
         FirebaseAuthManager.AuthStatus.RegisterError => "REGISTER ERROR",
         FirebaseAuthManager.AuthStatus.RegisterSuccessful => $"REGISTER SUCCESSFUL! REGISTERED AS {FirebaseAuthManager.GetDisplayName()}",
         FirebaseAuthManager.AuthStatus.LoginCanceled => "LOGIN WAS CANCELED",
         FirebaseAuthManager.AuthStatus.LoginError => "LOGIN ERROR",
         FirebaseAuthManager.AuthStatus.LoginSuccessful => $"LOGIN SUCCESSFUL! LOGGED IN AS {FirebaseAuthManager.GetDisplayName()}",
         FirebaseAuthManager.AuthStatus.SignedOut => "SIGNED OUT",
         FirebaseAuthManager.AuthStatus.Empty => "",
         FirebaseAuthManager.AuthStatus.RegisterRequested => "REGISTERING",
         FirebaseAuthManager.AuthStatus.LoginRequested => "LOGGING IN",
         FirebaseAuthManager.AuthStatus.SignOutRequested => "SIGNING OUT",
         _ => throw new ArgumentOutOfRangeException(nameof(authStatus), authStatus, null)
     });