public void Start() { if (currentBuildIndex == 0) { PlayerPrefs.DeleteKey(playerDataSaver.GetIsGuest().ToString()); playerDataSaver.SetIsGuest(0); emailInput.text = playerDataSaver.GetEmail(); passwordInput.text = playerDataSaver.GetPassword(); } if (currentBuildIndex == 1 && playerDataSaver.GetIsGuest() == 0) { IsFirstTime(); StartCoroutine(Initialization()); } }
public void CheckIfPlayerExistsInMemory() { if (!string.IsNullOrEmpty(playerDataSaver.GetUsername()) && !string.IsNullOrEmpty(playerDataSaver.GetPassword())) { email.text = playerDataSaver.GetEmail(); password.text = playerDataSaver.GetPassword(); CheckAutologin(); } }
private void UpdatePlayerInfo() { playerInfo = new PlayerInfo { PlayerUsername = playerDataSaver.GetUsername(), PlayerPassword = playerDataSaver.GetPassword(), PlayerEmail = playerDataSaver.GetEmail(), PlayerTeamName = playerDataSaver.GetTeamname(), PlayerWaste = playerDataSaver.GetWasteCollected(), PlayerRecycle = playerDataSaver.GetRecycleCollected(), PlayerRubbish = playerDataSaver.GetRubbishCollected(), PlayerCoins = playerDataSaver.GetCoinsAvailable(), PlayerCurrentLevel = playerDataSaver.GetProgressLevel(), RubbishInPlace = rubbishInPlace, RubbishInDistrict = rubbishInDistrict, RubbishInRegion = rubbishInRegion, RubbishInCountry = rubbishInCountry, RubbishPlace = place, RubbishDistrict = district, RubbishRegion = region, RubbishCountry = country }; }