コード例 #1
0
    private IEnumerator _CheckGPS()
    {
        bool mustCheckGPS = false;

        GPSService.StartGPS();

        if (!GPSService.IsActive())
        {
            gpsStatus.text = "Aguardando ativação do GPS no celular";
            mustCheckGPS   = true;
        }
        else if (GPSService.location[0] == 0.0 || GPSService.location[1] == 0.0)
        {
            GPSService.ReceivePlayerLocation();
            gpsStatus.text = "Obtendo localização...";
            mustCheckGPS   = true;
        }
        else
        {
            gpsStatus.text = "Localização obtida";
        }

        if (mustCheckGPS)
        {
            yield return(new WaitForSeconds(2));

            yield return(StartCoroutine(_CheckGPS()));
        }
        else
        {
            yield return(null);
        }
    }
コード例 #2
0
    public void Start()
    {
        previousView = "Plants";

        detailsCardObj.SetActive(true);
        addressCardObj.SetActive(false);
        sideWalkSizeObj.SetActive(false);
        if (!UserService.user.IsMinor())
        {
            termsToggle.gameObject.SetActive(false);
        }

        camService.resetFields("pot_seeding");
        StartCoroutine(_CheckCapturedPhoto());

        GPSService.StartGPS();
    }