version 1.3

This commit is contained in:
2023-01-02 00:08:18 +05:30
parent 8faf4476ed
commit af487ad62d
581 changed files with 145027 additions and 809 deletions

View File

@@ -1,9 +1,11 @@
using System;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using Debug = CustomLogger.Debug;
public class NewLoginManager : MonoBehaviour
{
@@ -20,6 +22,8 @@ public class NewLoginManager : MonoBehaviour
void Start()
{
// Feedbacks.Send("Test", "test", "test", CustomLogger.Debug.loggedText);
statusTxt.text = "Checking credentials";
btn_login.onClick.AddListener(OnRegisterButton);
loadingPanel.SetActive(true);
@@ -80,11 +84,13 @@ public class NewLoginManager : MonoBehaviour
PlayerPrefs.Save();
Login();
}catch{
}catch (Exception e){
statusTxt.text = "Failed";
MessageDialog.instance.ShowMessage("Failed!", "Failed to register you into the game.\nReason: " + id);
newUsernamePanel.SetActive(true);
usernameInput.text = "";
Feedbacks.Send("Register Failed", e.Message, e.StackTrace, CustomLogger.Debug.loggedText);
}
}
@@ -130,6 +136,8 @@ public class NewLoginManager : MonoBehaviour
MessageDialog.instance.ShowQuestion("Error",
"Failed to log you in using saved credentials.\nDo you want to open game with guest account?",OnYes:Register, OnNo:OnLoginFailed);
Feedbacks.Send("Login Failed", $"Bad credentials, username:{savedUsername}, password:{savedPassword}, isGoogle:{googleSigned}", www.text, CustomLogger.Debug.loggedText);
}
}