Пример #1
0
 public void onCountrySelect()
 {
     if (game != null)
     {
         mouse.enableClicking();
         currentCountryTarget = mouse.getCountry().GetComponent <PolygonFiller>();
         if (!currentCountryTarget.isTargeted())
         {
             if (mouse.getCountry().name.Equals(game.randomGenerator.getCountry().name))
             {
                 Debug.Log(game.getFailedPoints());
                 if (game.getFailedPoints() >= 3)
                 {
                     currentCountryTarget.target(currentCountryTarget.matFail);
                     game.resetFail();
                     Debug.Log("FAILED");
                 }
                 else
                 {
                     currentCountryTarget.target();
                 }
                 currentCountryTarget = null;
                 game.randomGenerator.generateNewRandomCountry();
             }
             else
             {
                 game.incrementFailedPoints();
             }
             if (game.getFailedPoints() >= 3)
             {
                 game.randomGenerator.getCountry().gameObject.GetComponent <PolygonFiller>().warning();
             }
         }
     }
     else
     {
         circle.gameObject.SetActive(true);
         circle.loadCountry(this, mouse.getCountry());
         currentCountryTarget = mouse.getCountry().GetComponent <PolygonFiller>();
         currentCountryTarget.target();
         //mouse.getCountry().GetComponent<PolygonFiller>().target();
         mouse.disableClicking();
     }
 }
Пример #2
0
    public void onPhaseChange()
    {
        switch (phase)
        {
        case 0:
            setText("Welcome to find the country");
            break;

        case 1:
            //Make the country UI blink or something between yellow outline and blue outline
            setText("You will be assigned a random country and your goal is to find that country. When you do find the country, tap it and you get score!");
            countryUI.SetActive(true);
            //setArrow(0,-350,90);
            break;

        //Pan
        case 2:
            setText("");
            //disableArrow();
            countryUI.SetActive(false);
            camPan.tutorialPan(exampleCountry, this);
            tapToContinueText.gameObject.SetActive(false);
            break;

        case 3:
            //Make Sweden blink red
            setText("If you select the wrong country too many times, the correct country will start blinking red and you get no points!");
            po.startBlink(po.matFail);
            tapToContinueText.gameObject.SetActive(true);
            break;


        case 4:
            //Make sweden solid green
            setText("Otherwise if you get the correct country, it will become green");
            po.stopBlink();
            po.target();
            break;

        case 5:
            //idk
            setText("If you want to limit yourself to a certain continent, head to the settings tab and change which continents should be included!\n Good luck");
            po.untarget();
            break;

        case 6:
            setText("");
            camPan.panToOriginalLocation();
            break;
        }
    }
Пример #3
0
    public void deactivateCountry()
    {
        if (currentCountryTarget == null)
        {
            return;
        }

        if (this.currentCountryTarget != null)
        {
            this.currentCountryTarget.blink = false;
        }
        currentCountryTarget.target();
        currentCountryTarget.StartCoroutine(currentCountryTarget.wait());
        currentCountryTarget = null;
    }