Building shop functional and Building states are saved online
This commit is contained in:
@@ -15,6 +15,7 @@ public class LoginManager : MonoBehaviour
|
||||
public Button regBtn;
|
||||
|
||||
public OtherUIbuttons otherUI;
|
||||
public BuildingData defaultBuilding;
|
||||
|
||||
void Start()
|
||||
{
|
||||
@@ -85,6 +86,7 @@ public class LoginManager : MonoBehaviour
|
||||
PlayerPrefs.SetString("password", login_password.text);
|
||||
PlayerPrefs.Save();}
|
||||
DBmanager.username = login_username.text;
|
||||
DBmanager.GetBuildingStates(www.text.Split('\t')[3]);
|
||||
DBmanager.SetGems(int.Parse(www.text.Split('\t')[2]),true);
|
||||
DBmanager.SetCoins(int.Parse(www.text.Split('\t')[1]),true);
|
||||
|
||||
@@ -110,7 +112,7 @@ public class LoginManager : MonoBehaviour
|
||||
{
|
||||
Debug.Log("User Registered succesfully");
|
||||
DBmanager.username = reg_username.text;
|
||||
|
||||
DBmanager.AddBuilding(defaultBuilding);
|
||||
UnityEngine.SceneManagement.SceneManager.LoadScene(1);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user