示例#1
0
    public IEnumerator Initialization()
    {
        yield return(new WaitForSeconds(1.5f));

        GetLocationDataOfRubbish();
        yield return(new WaitForSeconds(0.5f));

        playerInfo = new PlayerInfo
        {
            PlayerUsername     = playerDataSaver.GetUsername(),
            PlayerPassword     = playerDataSaver.GetPassword(),
            PlayerEmail        = playerDataSaver.GetEmail(),
            PlayerCountry      = playerDataSaver.GetCountry(),
            PlayerAvatar       = playerDataSaver.GetAvatar(),
            PlayerRubbish      = playerDataSaver.GetWasteCollected(),
            PlayerRecycle      = playerDataSaver.GetRecycleCollected(),
            PlayerTeamName     = playerDataSaver.GetTeamname(),
            PlayerCoins        = playerDataSaver.GetCoinsAvailable(),
            PlayerCurrentLevel = playerDataSaver.GetProgressLevel(),
            RubbishPlace       = place,
            RubbishDistrict    = district,
            RubbishRegion      = region,
            RubbishCountry     = country,
        };
        GetPlayerStats();
        yield return(new WaitForSeconds(0.5f));

        GetPlayerData();
        yield return(new WaitForSeconds(5f));

        StartCoroutine(Leaderboards.Instance.GetWorldLeaderboardByCountry());
    }
示例#2
0
 public void CheckIfPlayerExistsInMemory()
 {
     if (!string.IsNullOrEmpty(playerDataSaver.GetUsername()) && !string.IsNullOrEmpty(playerDataSaver.GetPassword()))
     {
         email.text    = playerDataSaver.GetEmail();
         password.text = playerDataSaver.GetPassword();
         CheckAutologin();
     }
 }
示例#3
0
 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
     };
 }