glogin fixd
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user