// Use this for initialization
    void Start()
    {
        ForceLandscapeLeft();
        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }



        int nrquestsdone = 0;

        if (PlayerPrefs.HasKey("NrQuestsDone"))
        {
            nrquestsdone = PlayerPrefs.GetInt("NrQuestsDone");
        }
        else
        {
            nrquestsdone = 0;
        }


        nrquestsdone++;
        PlayerPrefs.SetInt("NrQuestsDone", nrquestsdone);
        PlayerPrefs.Save();



        updateStates(nrquestsdone - 1);
    }
    private void Awake()
    {
        //Setting whether to use system language first. If it is on, then setting current language has no effect.
        LocalizationSupport.UseSystemLanguage = UseSystemLanguage;

        /*
         * if (Language.CompareTo ("English") == 0 || Language.CompareTo ("German") == 0) {
         *
         * } else {
         *      Language = "English";
         * }*/

        LocalizationSupport.CurrentLanguage = LocalizationSupport.StringToLanguage(Language);


        string originalPath = LocalizationSupport.StringsXMLPath;

        try
        {
            LocalizationSupport.StringsXMLPath = Path.GetFileNameWithoutExtension(StringsXmlResource);
        }
        catch (Exception)
        {
            Debug.LogError("Localization Configuration: Strings XML Path string is invalid!");
        }

        if ((!LocalizationSupport.StringsLoaded) || (originalPath != StringsXmlResource))
        {
            LocalizationSupport.LoadStrings();
        }
    }
    // Use this for initialization
    void Start()
    {
        ForceLandscapeLeft();

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        updateStates();

        m_LoadingText.SetActive(false);
        m_LoadingBack.SetActive(false);
        messageBox = UIUtility.Find <MessageBox>("MessageBox");


        if (messageBox == null)
        {
            Debug.Log("No message box set");
        }
        else
        {
            Debug.Log("Message set");
        }

        //  loginSuccessful("laco-wiki-app:///#access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IndwWDRxblFtTzVOWG1kbExUUXd6Vk53WWlZMCIsImtpZCI6IndwWDRxblFtTzVOWG1kbExUUXd6Vk53WWlZMCJ9.eyJpc3MiOiJodHRwczovL2Rldi5sYWNvLXdpa2kubmV0L2lkZW50aXR5IiwiYXVkIjoiaHR0cHM6Ly9kZXYubGFjby13aWtpLm5ldC9pZGVudGl0eS9yZXNvdXJjZXMiLCJleHAiOjE1NjM0NDU5MzMsIm5iZiI6MTU2MzQ0MjMzMywiY2xpZW50X2lkIjoid2ViYXBpIiwic2NvcGUiOiJ3ZWJhcGkiLCJzdWIiOiIyIiwiYXV0aF90aW1lIjoxNTYzNDQyMzMzLCJpZHAiOiJHZW9XaWtpIiwibmFtZSI6IlRvYmlhcyBTdHVybiIsImVtYWlsIjoidG9iaWFzLnN0dXJuQHZvbC5hdCIsInJvbGUiOiJVc2VyIiwiYW1yIjpbImV4dGVybmFsIl19.MeiCRFLNJM70M_YI0M1TST51V3kKr8UKRBWyupdW7HVrHiXQkAE_qe_v9sBAFIbZs4aBSZDmjAYPcEMiPg97bwepFogQTioUWAjlcF2X4kvFJvkC-KZnP67HFGH0BmCfdYNaJgSeRUn0LNMI_7hz8WgcLrT4dMkVMgwVUi_iwtPG0FD2P8EnBEm_pzFXDlDOAypJ5dVKHnb3hH8HIkVqiF6HYrMmxPy2tLMcmAbuIDybPqMD4VLA5R0vPvYaWlQCpkcuMBXrH_vXFoeGk1S45yU8e7N6kQgnOomtIL66iCu9N_xIpXZmNWzz3Os3-SWZ7-keBFcxcnDTT2D3WvtooQ&token_type=Bearer&expires_in=3600&scope=webapi");
        loginSuccessful("laco-wiki-app:///#access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IndwWDRxblFtTzVOWG1kbExUUXd6Vk53WWlZMCIsImtpZCI6IndwWDRxblFtTzVOWG1kbExUUXd6Vk53WWlZMCJ9.eyJpc3MiOiJodHRwczovL2Rldi5sYWNvLXdpa2kubmV0L2lkZW50aXR5IiwiYXVkIjoiaHR0cHM6Ly9kZXYubGFjby13aWtpLm5ldC9pZGVudGl0eS9yZXNvdXJjZXMiLCJleHAiOjE1NjU3ODMwNDAsIm5iZiI6MTU2NTc3OTQ0MCwiY2xpZW50X2lkIjoid2ViYXBpIiwic2NvcGUiOiJ3ZWJhcGkiLCJzdWIiOiI2IiwiYXV0aF90aW1lIjoxNTY1Nzc5MTIzLCJpZHAiOiJHZW9XaWtpIiwibmFtZSI6IlRvYmlhcyBTdHVybiIsImVtYWlsIjoidG9iaWFzLnN0dXJuQHZvbC5hdCIsInJvbGUiOiJVc2VyIiwiYW1yIjpbImV4dGVybmFsIl19.tf7y-AyazB_NaHhYe41yxTL32XtgdZKLR77vrU4l1cJ4Tr96ESxrZqEBS98bsqnnJGQ6YyCJBr7Tn65pdrQiXuQeK0q635QIdJhm5EzbpurDBYB6hEVWt0bOlJeIFbdkl7uFvFi5hUzQZICAPdDLdJEdXvnDdGXQ_vj9Ny3M2BRyPneqQ5RoQbHl-uh3Tf88HLsiDwM2vQ632UCbMCXhe-vU_Q3MU9D1Rgm0iB7R2fH249WhuYyerAA129PUHptAv7QysLm8WhgEBgGghFmuweGfHs7GFQeicUDv5mzUJlPU-tHjz5UoDPP5oODKF4TmQPaKAwk3IPYQS88XFwwNBQ&token_type=Bearer&expires_in=3600&scope=webapi");

        ImaginationOverflow.UniversalDeepLinking.DeepLinkManager.Instance.LinkActivated += Instance_LinkActivated;
    }
    // Use this for initialization
    void Start()
    {
        ForceLandscapeLeft();

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        updateStates();


        m_LoadingText.SetActive(false);
        m_LoadingBack.SetActive(false);
        messageBox = UIUtility.Find <MessageBox>("MessageBox");


        if (messageBox == null)
        {
            Debug.Log("No message box set");
        }
        else
        {
            Debug.Log("Message set");
        }


        // createValidationsList();

        loadValidationSessions();

        m_ButtonNext.SetActive(false);
    }
Exemplo n.º 5
0
    private void Start()
    {
        StartCoroutine(changeFramerate());
        ForceLandscapeLeft();

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        HideDownloading();

        control = (OnlineMapsTileSetControl)OnlineMapsControlBase.instance;
        api     = OnlineMaps.instance;

        map = OnlineMaps.instance;

        OnlineMapsControlBase3D control2 = GetComponent <OnlineMapsControlBase3D>();

        if (control2 == null)
        {
            Debug.Log("You must use the 3D control (Texture or Tileset).");
            return;
        }

        m_ButtonReset.SetActive(false);

        //OnlineMapsControlBase.instance.allowUserControl = false;//true;//false;
        //	OnlineMaps.instance.OnChangeZoom += OnChangeZoom;
        OnlineMapsTile.OnTileDownloaded         += OnTileDownloaded;
        OnlineMaps.instance.OnStartDownloadTile += OnStartDownloadTile;

        control2.OnMapPress   += OnMapPress;
        control2.OnMapRelease += OnMapRelease;
        control2.OnMapZoom    += OnMapZoom;

        //----------------
        // Set 2d mode
        Camera c = Camera.main;

        c.orthographic = true;
        //---------------

/*		control2.setUpdateControl (true);
 *              control2.setAlwaysUpdateControl (true);
 *              control2.allowUserControl = true;
 */
        m_ButtonBack.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Back");
        m_ButtonNext.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("BtnDownload");
        m_ExplanationText.GetComponent <UnityEngine.UI.Text>().text      = LocalizationSupport.GetString("ExplanationOfflineAccess");


        m_DownloadBtnStart.GetComponentInChildren <UnityEngine.UI.Text>().text     = LocalizationSupport.GetString("BtnDownloadNow");
        m_DownloadBtnCompleted.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Ok");
        m_ButtonNext.SetActive(false);
        //OnLocationChanged (new Vector2 (0.0f, 0.0f));

        toUserLocation();
    }
    // Use this for initialization
    void Start()
    {
        StartCoroutine(changeFramerate());
        ForceAndFixLandscape();

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        //Screen.fullScreen = false;

        /*Screen.orientation = ScreenOrientation.Portrait;
         *
         * Screen.autorotateToPortrait = true;
         * Screen.autorotateToPortraitUpsideDown = false;
         * Screen.autorotateToLandscapeRight = false;
         * Screen.autorotateToLandscapeLeft = false;*/

        m_bShown = false;
        m_Show   = 0;

        if (PlayerPrefs.HasKey("RegisterMsgShown"))
        {
            int hasshown = PlayerPrefs.GetInt("RegisterMsgShown");
            Debug.Log("RegisterMsgShown: " + hasshown);
            if (hasshown == 1)
            {
                m_bShown = true;
            }
            else
            {
                PlayerPrefs.SetInt("RegisterMsgShown", 1);
                PlayerPrefs.Save();
            }
        }
        else
        {
            Debug.Log("RegisterMsgShown not set");
            PlayerPrefs.SetInt("RegisterMsgShown", 1);
            PlayerPrefs.Save();
        }
        m_bShown = false;         // Comment this out again

        messageBox = UIUtility.Find <MessageBox> ("MessageBox");

        updateStates();
    }
Exemplo n.º 7
0
    // Use this for initialization
    void Start()
    {
        ForceLandscapeLeft();/*
                              * Screen.orientation = ScreenOrientation.Portrait;
                              *
                              * Screen.autorotateToPortrait = true;
                              * Screen.autorotateToPortraitUpsideDown = false;
                              * Screen.autorotateToLandscapeRight = false;
                              * Screen.autorotateToLandscapeLeft = false;
                              *
                              *
                              * Screen.orientation = ScreenOrientation.Portrait;
                              * Screen.autorotateToPortrait = true;
                              * Screen.autorotateToPortraitUpsideDown = false;
                              * Screen.autorotateToLandscapeRight = false;
                              * Screen.autorotateToLandscapeLeft = false;*/


        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        updateStates();


        m_LoadingText.SetActive(false);
        m_LoadingBack.SetActive(false);
        messageBox = UIUtility.Find <MessageBox> ("MessageBox");
        //	verticalMessageBox = UIUtility.Find<MessageBox> ("VerticalMessageBox");

        /*
         *      messageBox.Show(title,message,icon,null,options);
         */


        if (messageBox == null)
        {
            Debug.Log("No message box set");
        }
        else
        {
            Debug.Log("Message set");
        }

        hideTerms();
    }
    // Use this for initialization
    void Start()
    {
        StartCoroutine(changeFramerate());


        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }


        m_CurSelection = 0;
        m_AddedTexts   = new ArrayList();
        UpdateText();
        updateStates();

        loadLeaderboard();
    }
Exemplo n.º 9
0
    // Use this for initialization
    void Start()
    {
        StartCoroutine(changeFramerate());

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        Screen.orientation = ScreenOrientation.Portrait;

        Screen.autorotateToPortrait           = true;
        Screen.autorotateToPortraitUpsideDown = false;
        Screen.autorotateToLandscapeRight     = false;
        Screen.autorotateToLandscapeLeft      = false;



        updateStates();
    }
    // Use this for initialization
    void Start()
    {
        StartCoroutine(changeFramerate());
        m_DebugIter = 0;

        m_ButtonDebug.SetActive(false);
        if (PlayerPrefs.HasKey("DebugEnabled"))
        {
            if (PlayerPrefs.GetInt("DebugEnabled") == 1)
            {
                m_ButtonDebug.SetActive(true);
            }
        }

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        updateStates();
    }
Exemplo n.º 11
0
    // Use this for initialization
    void Start()
    {
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        SetPortrait(false);
        //UseCompass ( true ) ;
        // setup ui
        //m_ButtonFinish.interactable = false;
        m_ButtonBack.interactable = true; //false;
        m_ButtonNext.interactable = true; //false;
        m_DebugView.SetActive(false);
        //  PanelManual.SetActive(false);
        //   PanelSequential.SetActive(false);
        m_PhotoTask = m_CompassStrip;

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        m_ButtonBack.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("BtnBack");
        m_ButtonNext.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Next");
    }
    // Use this for initialization
    void Start()
    {
        Debug.Log("Intro1");
        StartCoroutine(changeFramerate());
        ForceLandscapeLeft();

        /*
         * Screen.orientation = ScreenOrientation.Portrait;
         * Screen.autorotateToPortrait = true;
         * Screen.autorotateToPortraitUpsideDown = false;
         * Screen.autorotateToLandscapeRight = false;
         * Screen.autorotateToLandscapeLeft = false;*/

        Debug.Log("Intro2");

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }


        Debug.Log("Intro3");
        m_CurState = 0;
        updateStates();


        Debug.Log("Intro4");
        bool bApple = false;

        if (!bApple)
        {
            m_AppleDisclaimer.SetActive(false);
            m_ImageDisclaimer.SetActive(false);
            m_ImageNoDisclaimer.SetActive(true);
        }
        else
        {
            m_AppleDisclaimer.SetActive(true);
            m_ImageDisclaimer.SetActive(true);
            m_ImageNoDisclaimer.SetActive(false);
        }


        Debug.Log("Intro5");
        UnityEngine.UI.Text text;
        if (Application.systemLanguage == SystemLanguage.German || true)
        {
            text = m_Page1Text.GetComponent <UnityEngine.UI.Text>();
            //	text.text = "Versuche Zielpunkte zu erreichen und hilf so beim Umweltschutz in Österreich!";
            text.text = LocalizationSupport.GetString("IntroText");//"Join the green side!\nHelp #FAOUN in the monitoring process of the world’s forests.";

            text = m_Text.GetComponent <UnityEngine.UI.Text>();
            //	text.text = "Versuche Zielpunkte zu erreichen und hilf so beim Umweltschutz in Österreich!";
            text.text = LocalizationSupport.GetString("IntroText");//"Join the green side!\nHelp #FAOUN in the monitoring process of the world’s forests.";


            text      = m_PrizeText.GetComponent <UnityEngine.UI.Text>();
            text.text = "Du erhälst für jeden besuchten Punkt 1 Euro!";

            /*text = m_Page2Text.GetComponent<UnityEngine.UI.Text>();
             *          text.text = "Jeden Tag werden in Österreich 150000 m² Land in Geschäfts-, Verkehrs-, Freizeit- und Wohnflächen umgewandelt. Dabei müssen fruchtbare Böden, Artenvielfalt und natürliche CO2-Speicher Asphalt und Beton weichen. Dies führt unter anderem dazu, dass das Risiko für Überschwemmungen steigt, landwirtschaftliche Flächen unproduktiv werden, Hitzewellen in Städten steigen und zur Erderwärmung beitragen.\n\n" +
             *          "Mit deiner Hilfe kann FotoQuest Go die Folgen der Veränderung unserer Landschaft aufzeichnen und dabei helfen, Österreichs Natur für zukünftige Generationen zu erhalten.\n\n" +
             *          "Wir haben 9000 Punkte auf ganz Österreich verteilt. Schaue auf die Karte, finde einen Punkt in deiner Nähe und folge dann den Anweisungen um eine Quest durchzufüren. Dabei musst du Bilder von der Landschaft machen und ein paar kurze Fragen beantworten.";
             */
            /*RectTransform rectTransform2 = m_Page2Text.GetComponent<RectTransform> ();
             *          float scalex = rectTransform2.sizeDelta.x;
             *          float heightentry = 1000.0f;
             *          rectTransform2.sizeDelta = new Vector2 (scalex, heightentry);
             *
             *
             *          float posx = rectTransform2.position.x;
             *          float posy = rectTransform2.position.y;
             *          float posz = rectTransform2.position.z;
             *          rectTransform2.position = new Vector3 (posx, -287.0f, posz);*/


            //	text = m_Page2Title.GetComponent<UnityEngine.UI.Text>();
            //		text.text = "Warum?";

            text      = m_Page3Title.GetComponent <UnityEngine.UI.Text>();
            text.text = "Warum?";

            text = m_Page3Text.GetComponent <UnityEngine.UI.Text>();
            //text.text = "Alle gesammelten Daten werden für alle frei verfügbar sein und einen wichtigen Beitrag zum Naturschutz leisten!";
            //	text.text = "Für jeden besuchten Punkt verdienst du 1€!\n\nDas Geld wird nach dem Ende der Kampagne (28. Dezember 2017) auf dein PayPal Konto überwiesen.";
            //	text.text = "Once you complete your quest, scientists at IIASA will check the quality of your results within 24 hours. If your contribution passes the quality check you will earn 1 EUR.\n\nAt the end of the campaign (December 2017), your total earnings will be transferred to your PayPal account.";
            text.text = LocalizationSupport.GetString("IntroText2");//"FRA Quest is a crowdsourcing tool developed to gather landscape information. The app will guide you to a series of selected locations, collect cardinal pictures and get information about the land cover characteristics. The data collected will be stored in your phone and will be uploaded to a public database once you are connected again.";

            text      = m_AppleDisclaimer.GetComponent <UnityEngine.UI.Text>();
            text.text = "(Hinweis: Apple ist nicht Sponsor von FotoQuest Go)";

            text      = m_PageText3.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("IntroText3");
            text      = m_PageText4.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("IntroText4");
            text      = m_PageText5.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("IntroText5");

            m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Next");//"WEITER";
        }
        else
        {
            text = m_Page1Text.GetComponent <UnityEngine.UI.Text>();
            //			text.text = "Try to reach locations to help landscape conservation in Austria!";
            text.text = LocalizationSupport.GetString("IntroText");//"Join the green side!\nHelp #FAOUN in the monitoring process of the world’s forests.";


            text = m_PrizeText.GetComponent <UnityEngine.UI.Text>();
            //text.text = "And earn for every visited location 1€!";
            text.text = "You can earn 1 EUR for each point you visit!";

            //text = m_Page2Text.GetComponent<UnityEngine.UI.Text>();
            //	text.text = "In order to track land changes and to better evaluate the effects these changes have, the scientists at IIASA would like to run a careful examination and need your help!";

            /*	text.text = "Every day around 100.000 m² land are soil sealed in Austria. In order to track these land changes and to better evaluate the effects these changes have more data is urgently needed.\n\n" +
             *      "Therefore the scientists at IIASA would like to run a careful examination and need your help to visit around 8000 points in Austria which are located on a regular 2 km grid!\n\n" +
             *      "All data collected (after having gone through an anonymization process by removing all personal information like username or e-mail) will be made completely free and thus can serve as a very valuable source for science!";
             */
            /*	text.text = "Every day around 150,000 m² of soil are being turned into roads, businesses, homes and recreational areas in Austria, which leads to soil degradation and an increasing risk of flooding, water scarcity, unproductive agricultural land and heat waves in cities, contributing to global warming.\n\n" +
             *      "With your help, FotoQuest Go can track the effect of these changes in our landscape and help to conserve Austria’s nature for future generations.\n\n" +
             *      "We have placed around 9,000 points at a range of locations across Austria. Using the map, find a point near you and then follow the instructions to complete each quest. A quest requires you to take photographs of the landscape and answer a few short questions.";
             *
             *  //, the scientists at IIASA would like to run a careful examination and need your help! In order to track land changes and to better evaluate the effects these changes have, the scientists at IIASA would like to run a careful examination and need your help!";
             *
             *
             *  text = m_Page2Title.GetComponent<UnityEngine.UI.Text>();
             *  text.text = "Why help?";
             *
             */
            text      = m_Page3Title.GetComponent <UnityEngine.UI.Text>();
            text.text = "Why help?";


            text = m_Page3Text.GetComponent <UnityEngine.UI.Text>();
            //text.text = "All data collected will be made completely free and will be very valuable to improve nature protection!";
            //text.text = "You will earn 1€ for every visited location!\n\nThe money will be transferred to your PayPal account after the campaign has finished (December 2017) and has successfully gone through a quality control.\n\nAny attempt to cheat or hack will result in a ban and no money will be transferred.";
            //text.text = "You will earn 1€ for every visited location!\n\nThe money will be transferred to your PayPal account after the campaign has finished (December 2017).";
            //text.text = "Once you complete your quest, scientists at IIASA will check the quality of your results within 24 hours. If your contribution passes the quality check, the point you visited will be removed from the map, and you will earn 1 EUR. At the end of the campaign (December 2017), your total earnings will be transferred to your PayPal account. PLEASE MAKE SURE TO PROVIDE THE CORRECT PAYPAL ADDRESS.";
            //text.text = "Once you complete your quest, scientists at IIASA will check the quality of your results within 24 hours. If your contribution passes the quality check you will earn 1 EUR.\n\nAt the end of the campaign (December 2017), your total earnings will be transferred to your PayPal account.";
            text.text = LocalizationSupport.GetString("IntroText2"); //"FRA Quest is a crowdsourcing tool developed to gather landscape information. The app will guide you to a series of selected locations, collect cardinal pictures and get information about the land cover characteristics. The data collected will be stored in your phone and will be uploaded to a public database once you are connected again.";
                                                                     //

            //Any attempt to cheat or hack will result in a ban and no money will be transferred.

            m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Next");//"NEXT";
        }

        Debug.Log("Intro6");
Exemplo n.º 13
0
    // Use this for initialization
    void Start()
    {
        StartCoroutine(changeFramerate());

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        Screen.orientation                    = ScreenOrientation.Portrait;
        Screen.autorotateToPortrait           = true;
        Screen.autorotateToPortraitUpsideDown = false;
        Screen.autorotateToLandscapeRight     = false;
        Screen.autorotateToLandscapeLeft      = false;


        m_CurState = 0;
        updateStates();

        UnityEngine.UI.Text text;
        if (Application.systemLanguage == SystemLanguage.German)
        {
            text      = m_Page1Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions1");

            text      = m_Page2Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions2");

            text      = m_Page3Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions3");

            text      = m_Page4Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions4");

            text      = m_Page5Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions5");



            m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Next");
        }
        else
        {
            text      = m_Page1Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions1");

            text      = m_Page2Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions2");

            text      = m_Page3Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions3");

            text      = m_Page4Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions4");

            text      = m_Page5Text.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("Instructions5");


            m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Next");
        }

        //PlayerPrefs.SetInt ("InstructionShown", 1);
        //PlayerPrefs.Save ();

#if UNITY_ANDROID
#if ASDFASDFASDF
        NativeEssentials.Instance.Initialize();
        PermissionsHelper.StatusResponse sr;
        PermissionsHelper.StatusResponse sr2;
        PermissionsHelper.StatusResponse sr3;        // = PermissionsHelper.StatusResponse.;//NativeEssentials.Instance.GetAndroidPermissionStatus(PermissionsHelper.Permissions.CAMERA);
        sr  = NativeEssentials.Instance.GetAndroidPermissionStatus(PermissionsHelper.Permissions.ACCESS_FINE_LOCATION);
        sr2 = NativeEssentials.Instance.GetAndroidPermissionStatus(PermissionsHelper.Permissions.ACCESS_COARSE_LOCATION);
        sr3 = NativeEssentials.Instance.GetAndroidPermissionStatus(PermissionsHelper.Permissions.CAMERA);
        if (sr == PermissionsHelper.StatusResponse.PERMISSION_RESPONSE_GRANTED && sr2 == PermissionsHelper.StatusResponse.PERMISSION_RESPONSE_GRANTED)
        {
        }
        else
        {
            if (sr == PermissionsHelper.StatusResponse.PERMISSION_RESPONSE_GRANTED && sr2 == PermissionsHelper.StatusResponse.PERMISSION_RESPONSE_GRANTED)
            {
            }
            else
            {
                NativeEssentials.Instance.RequestAndroidPermissions(new string[] { PermissionsHelper.Permissions.ACCESS_FINE_LOCATION, PermissionsHelper.Permissions.ACCESS_COARSE_LOCATION, PermissionsHelper.Permissions.CAMERA });
            }
        }
#endif
#endif
    }
Exemplo n.º 14
0
    // Use this for initialization
    void Start()
    {
        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        Screen.orientation                    = ScreenOrientation.Portrait;
        Screen.autorotateToPortrait           = true;
        Screen.autorotateToPortraitUpsideDown = false;
        Screen.autorotateToLandscapeRight     = false;
        Screen.autorotateToLandscapeLeft      = false;

        //PlayerPrefs.DeleteAll();
        //PlayerPrefs.Save();

        int introshown = PlayerPrefs.GetInt("IntroductionShown");

        if (introshown == 0)
        {
            Application.LoadLevel("Introduction");
            return;
        }

        if (PlayerPrefs.HasKey("Token"))
        {
            bool     isSessionActive = false;
            string   sessions        = PlayerPrefs.GetString("ActiveSessions");
            string   newsessions     = "";
            string[] splitArray      = sessions.Split(char.Parse(" "));
            for (int i = 0; i < splitArray.Length; i++)
            {
                string valid = splitArray[i];
                if (valid != "" && valid != " ")
                {
                    isSessionActive = true;
                }
            }

            if (isSessionActive == false)
            {
                Application.LoadLevel("Validations");
            }
            else
            {
                Application.LoadLevel("DemoMap");
            }
        }
        else
        {
            Application.LoadLevel("LoginLacoWiki");
        }

        /*
         * if (PlayerPrefs.HasKey("LoggedOut"))
         * {
         *  int loggedout = PlayerPrefs.GetInt("LoggedOut");
         *  if (loggedout == 1)
         *  {
         *      Application.LoadLevel("StartScreen");
         *      return;
         *  }
         * }
         *
         *
         * if (PlayerPrefs.HasKey("NrQuestsDone"))
         * {
         *  int nrquestsdone = PlayerPrefs.GetInt("NrQuestsDone");
         *  Application.LoadLevel("DemoMap");
         *  return;
         * }
         *
         * if (!PlayerPrefs.HasKey("IntroductionShown"))
         * {
         *  Application.LoadLevel("Introduction");
         * }
         * else
         * {
         *  Application.LoadLevel("DemoMap");
         * }*/
    }
    // Use this for initialization
    void Start()
    {
        ForceLandscapeLeft();

        // PlayerPrefs.DeleteAll();
        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }

        updateStates();


        m_LoadingText.SetActive(false);
        m_LoadingBack.SetActive(false);
        messageBox = UIUtility.Find <MessageBox>("MessageBox");


        if (messageBox == null)
        {
            Debug.Log("No message box set");
        }
        else
        {
            Debug.Log("Message set");
        }

        //     loginSuccessful("laco-wiki-app:///#access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IndwWDRxblFtTzVOWG1kbExUUXd6Vk53WWlZMCIsImtpZCI6IndwWDRxblFtTzVOWG1kbExUUXd6Vk53WWlZMCJ9.eyJpc3MiOiJodHRwczovL2Rldi5sYWNvLXdpa2kubmV0L2lkZW50aXR5IiwiYXVkIjoiaHR0cHM6Ly9kZXYubGFjby13aWtpLm5ldC9pZGVudGl0eS9yZXNvdXJjZXMiLCJleHAiOjE1NTU0MTIxMjgsIm5iZiI6MTU1NTQwODUyOCwiY2xpZW50X2lkIjoid2ViYXBpIiwic2NvcGUiOiJ3ZWJhcGkiLCJzdWIiOiI3MSIsImF1dGhfdGltZSI6MTU1NTQwODUyNywiaWRwIjoiR2VvV2lraSIsIm5hbWUiOiJUb2JpYXMgU3R1cm4iLCJlbWFpbCI6InRvYmlhcy5zdHVybkB2b2wuYXQiLCJyb2xlIjoiVXNlciIsImFtciI6WyJleHRlcm5hbCJdfQ.Yhw9SxK_mxEFpGCgHuhL11eI-SmTANAOBx2X-QzMx5D9LHFJmhTwwcMQvvQjIM9KBvhUmJxNTGlh4oeYlfoJM8uJvcBfLozuyy_n2qPh4FwWWYihZcn-iFEqm8PJqSA6Nm3tYe4H1MiDZyuidF6fXPgW0o6eUhEGGWB2EwbaeSvxXj7ow0xG_XWrU6ipKVrPLk79Jt4YZnH6tOa7pNe2MIcMmG2lxA-L4ccAj3OowvNTqJ8ifRYIXGN5octDTa9-Px4x4fL6ivrukeUjhedQoPNpY0jXyNAtrKdvRS-STdU13o-1toSDb4JbiADx0BIu7i5OZpSdByKFl9nzRxPLiw&token_type=Bearer&expires_in=3600&scope=webapi");


        m_AddedTexts = new ArrayList();
        // createValidationsList();

        loadValidationSessions();

        m_SessionBtnBack.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Back");//"Zurück";

        m_SessionBtnStart.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Start");
        m_SessionBtnStop.GetComponentInChildren <UnityEngine.UI.Text>().text  = LocalizationSupport.GetString("Stop");

        showSession(false);

        bool   isSessionActive = false;
        string sessions        = PlayerPrefs.GetString("ActiveSessions");
        string newsessions     = "";

        string[] splitArray = sessions.Split(char.Parse(" "));
        for (int i = 0; i < splitArray.Length; i++)
        {
            string valid = splitArray[i];
            if (valid != "" && valid != " ")
            {
                isSessionActive = true;
            }
        }
        if (!isSessionActive)
        {
            m_ButtonNext.SetActive(false);
        }
        else
        {
            m_ButtonNext.SetActive(true);
        }
    }
    // Use this for initialization
    void Start()
    {
        Debug.Log("Intro1");
        StartCoroutine(changeFramerate());
        ForceLandscapeLeft();

        /*
         * Screen.orientation = ScreenOrientation.Portrait;
         * Screen.autorotateToPortrait = true;
         * Screen.autorotateToPortraitUpsideDown = false;
         * Screen.autorotateToLandscapeRight = false;
         * Screen.autorotateToLandscapeLeft = false;*/

        Debug.Log("Intro2");

        if ((!LocalizationSupport.StringsLoaded))
        {
            LocalizationSupport.LoadStrings();
        }


        Debug.Log("Intro3");
        m_CurState = 0;
        updateStates();


        Debug.Log("Intro4");
        bool bApple = false;



        Debug.Log("Intro5");
        UnityEngine.UI.Text text;
        if (Application.systemLanguage == SystemLanguage.German || true)
        {
            text = m_Text.GetComponent <UnityEngine.UI.Text>();
            //  text.text = "Versuche Zielpunkte zu erreichen und hilf so beim Umweltschutz in Österreich!";
            text.text = LocalizationSupport.GetString("IntroText");//"Join the green side!\nHelp #FAOUN in the monitoring process of the world’s forests.";


            /*text = m_Page2Text.GetComponent<UnityEngine.UI.Text>();
             * text.text = "Jeden Tag werden in Österreich 150000 m² Land in Geschäfts-, Verkehrs-, Freizeit- und Wohnflächen umgewandelt. Dabei müssen fruchtbare Böden, Artenvielfalt und natürliche CO2-Speicher Asphalt und Beton weichen. Dies führt unter anderem dazu, dass das Risiko für Überschwemmungen steigt, landwirtschaftliche Flächen unproduktiv werden, Hitzewellen in Städten steigen und zur Erderwärmung beitragen.\n\n" +
             * "Mit deiner Hilfe kann FotoQuest Go die Folgen der Veränderung unserer Landschaft aufzeichnen und dabei helfen, Österreichs Natur für zukünftige Generationen zu erhalten.\n\n" +
             * "Wir haben 9000 Punkte auf ganz Österreich verteilt. Schaue auf die Karte, finde einen Punkt in deiner Nähe und folge dann den Anweisungen um eine Quest durchzufüren. Dabei musst du Bilder von der Landschaft machen und ein paar kurze Fragen beantworten.";
             */
            /*RectTransform rectTransform2 = m_Page2Text.GetComponent<RectTransform> ();
             * float scalex = rectTransform2.sizeDelta.x;
             * float heightentry = 1000.0f;
             * rectTransform2.sizeDelta = new Vector2 (scalex, heightentry);
             *
             *
             * float posx = rectTransform2.position.x;
             * float posy = rectTransform2.position.y;
             * float posz = rectTransform2.position.z;
             * rectTransform2.position = new Vector3 (posx, -287.0f, posz);*/


            //  text = m_Page2Title.GetComponent<UnityEngine.UI.Text>();
            //      text.text = "Warum?";


            text      = m_PageText3.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("IntroText3");
            text      = m_PageText4.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("IntroText4");
            text      = m_PageText5.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("IntroText5");
            text      = m_PageText6.GetComponent <UnityEngine.UI.Text>();
            text.text = LocalizationSupport.GetString("IntroText6");

            m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Next");//"WEITER";
        }
        else
        {
            //text = m_Page2Text.GetComponent<UnityEngine.UI.Text>();
            //  text.text = "In order to track land changes and to better evaluate the effects these changes have, the scientists at IIASA would like to run a careful examination and need your help!";

            /*  text.text = "Every day around 100.000 m² land are soil sealed in Austria. In order to track these land changes and to better evaluate the effects these changes have more data is urgently needed.\n\n" +
             *      "Therefore the scientists at IIASA would like to run a careful examination and need your help to visit around 8000 points in Austria which are located on a regular 2 km grid!\n\n" +
             *      "All data collected (after having gone through an anonymization process by removing all personal information like username or e-mail) will be made completely free and thus can serve as a very valuable source for science!";
             */
            /*  text.text = "Every day around 150,000 m² of soil are being turned into roads, businesses, homes and recreational areas in Austria, which leads to soil degradation and an increasing risk of flooding, water scarcity, unproductive agricultural land and heat waves in cities, contributing to global warming.\n\n" +
             *      "With your help, FotoQuest Go can track the effect of these changes in our landscape and help to conserve Austria’s nature for future generations.\n\n" +
             *      "We have placed around 9,000 points at a range of locations across Austria. Using the map, find a point near you and then follow the instructions to complete each quest. A quest requires you to take photographs of the landscape and answer a few short questions.";
             *
             *  //, the scientists at IIASA would like to run a careful examination and need your help! In order to track land changes and to better evaluate the effects these changes have, the scientists at IIASA would like to run a careful examination and need your help!";
             *
             *
             *  text = m_Page2Title.GetComponent<UnityEngine.UI.Text>();
             *  text.text = "Why help?";
             *
             */
            //Any attempt to cheat or hack will result in a ban and no money will be transferred.

            m_Button.GetComponentInChildren <UnityEngine.UI.Text>().text = LocalizationSupport.GetString("Next");//"NEXT";
        }

        Debug.Log("Intro6");