glogin fixd

This commit is contained in:
2023-08-21 08:23:32 +05:30
parent 431f8bee75
commit 3f90e12cfe
8 changed files with 115 additions and 73 deletions

View File

@@ -4,7 +4,7 @@ using UnityEngine;
public class CheckUpdates : MonoBehaviour
{
public static int ClientVersion = 1;
public static int ClientVersion = 2;
public static int ServerVersion;
public float interval = 30;
@@ -37,7 +37,7 @@ public class CheckUpdates : MonoBehaviour
ServerVersion = int.Parse(req.text);
if(ServerVersion <= 0){
LoadingScreen.LoadLevel("maintaince");
}else if(ServerVersion != ClientVersion){
}else if(ServerVersion > ClientVersion){
LoadingScreen.LoadLevel("update");
}
}

View File

@@ -124,15 +124,15 @@ public static class DataManager{
}
Debug.Log("Success parsing userdata");
PlayerPrefs.SetString("username", username);
PlayerPrefs.SetString("password", username);
PlayerPrefs.SetString("username", username + "#0");
PlayerPrefs.SetString("password", username+ "#0");
PlayerPrefs.Save();
}catch(Exception e){
Debug.Log("Error parsing userdata");
}
}else{
if(request.downloadHandler.text == "0"){
userData = new UserData(){username = username};
userData = new UserData(){username = username + "#0"};
}else{
MessageBox.ShowMessage("Error logging in, Server said\n" +request.downloadHandler.text);
return;

View File

@@ -139,7 +139,7 @@ public class GameManager : MonoBehaviour
GameOverUI.SetActive(true);
adCounter++;
if(adCounter > 1){
if(adCounter > 1 || DataManager.userData.faucetId > 0){
adCounter=0;
AdsManager.instance.ShowIntAd();
}