Esempio n. 1
0
 public void ResetAll()
 {
     ScoreSaver.SaveHighScore("0");
     TutorialDoneSaver.SaveTutorialDone("false");
     ChangeSettingsText.SetTextTo("Alles wurde erfolgreich zurückgesetzt");
 }
Esempio n. 2
0
 // Update is called once per frame
 void Update()
 {
     time          = +Time.deltaTime;
     MousePosition = new Vector3(screenx, screeny);
     if (MouseClickCounter == 1 || MouseClickCounter == 3 || MouseClickCounter == 4)
     {
         if (createdObjects == false)
         {
             GameObject.Find("Canvas/Text").GetComponent <Transform>().position += new Vector3(0.0f, +200.0f);
             PlayerClone    = Instantiate(player, new Vector3(0.1f, 0.0f, 0.0f), Quaternion.identity) as GameObject;
             createdObjects = true;
             Button.SetActive(false);
             tutorialtext.text = "Klicke Kliff(dein Spieler)";
             time = 0.0f;
         }
         if (MousePosition == new Vector3(0.0f, 0.0f) || MousePosition == new Vector3(1.0f, 0.0f) || MousePosition == new Vector3(0.0f, 1.0f))
         {
             if (PlayerClicked == false && MouseClickCounter == 1)
             {
                 MouseClickCounter++;
                 PlayerClicked = true;
                 time          = 0.0f;
             }
         }
         if (MousePosition == new Vector3(0.0f, 0.0f) || MousePosition == new Vector3(1.0f, 0.0f) || MousePosition == new Vector3(0.0f, 1.0f) || MousePosition == new Vector3(1.0f, 1.0f))
         {
             if (handleClicked == false && MouseClickCounter == 3)
             {
                 MouseClickCounter++;
                 handleClicked = true;
                 //time = 0.0f;
             }
         }
         if (MousePosition == new Vector3(2.0f, 5.0f) || MousePosition == new Vector3(1.0f, 5.0f) || MousePosition == new Vector3(0.0f, 5.0f))
         {
             if (energyBarClicked == false && MouseClickCounter == 4 && handleClicked == true)
             {
                 MouseClickCounter++;
                 handleClicked    = false;
                 energyBarClicked = true;
                 time             = 0.0f;
             }
         }
     }
     Debug.Log(screenx);
     Debug.Log(screeny);
     Debug.Log(MouseClickCounter);
     Debug.Log(PlayerClicked);
     Debug.Log(handleClicked);
     Debug.Log(MousePosition);
     if (MouseClickCounter == 2 && createdArrows == false)
     {
         Button.SetActive(true);
         tutorialtext.text  = "Kliff kann sich jeweils einen Block in je 8Richtungen bewegen";
         arrowin8directions = Instantiate(arrows, new Vector3(0.1f, -0.25f, 0.0f), Quaternion.identity) as GameObject;
         createdArrows      = true;
     }
     if (MouseClickCounter == 3 && createdHandle == false)
     {
         if (createdArrows == true)
         {
             arrowin8directions = GameObject.Find("arrowsin8directions(Clone)");
             PlayerClone        = GameObject.Find("player(Clone)");
             arrowin8directions.SetActive(false);
             PlayerClone.SetActive(false);
             createdArrows = false;
         }
         Button.SetActive(false);
         tutorialtext.text = "Dies sind die Griffe, klicke auf die Griffe um dich zu bewegen";
         fingertab.SetActive(true);
         handleObject  = Instantiate(handlePrefab, new Vector3(0.0f, 0.0f, 0.0f), Quaternion.identity) as GameObject;
         createdHandle = true;
     }
     if (MouseClickCounter == 4 && createdEnergyObjects == false)
     {
         //Button.SetActive (true);
         fingertab.GetComponent <Transform>().position = new Vector3(0.0f, 0.0f);
         handleObject      = GameObject.Find("handlePrefab(Clone)");
         tutorialtext.text = "Außerdem darfst du nie deine Energie aus dem Auge lassen. Drücke auf die EnergieLeiste";
         handleObject.SetActive(false);
         fingertab.SetActive(false);
         arrowtoEnergyBar = Instantiate(arrowtoEnergyBarTransform, new Vector3(0.4f, -4.5f), Quaternion.identity) as GameObject;
         EnergyBar.SetActive(true);
         createdEnergyObjects = true;
     }
     if (MouseClickCounter == 5 && createdEnergyObjects == true)
     {
         Button.SetActive(true);
         //meter.SetActive(true);
         arrowtoEnergyBar = GameObject.Find("arrowToEnergyBarPrefab(Clone)");
         arrowtoEnergyBar.SetActive(false);
         EnergyBar.SetActive(false);
         createdEnergyObjects = false;
         GameObject.Find("Canvas/Text").GetComponent <Transform>().position += new Vector3(0.0f, -200.0f);
         tutorialtext.text = "Los Gehts";
         TutorialButtonTextChanger.SetTutorialButtonText("Los Gehts");
     }
     if (MouseClickCounter >= 6)
     {
         TutorialDoneSaver.SaveTutorialDone("true");
         LevelLoader.LoadLevel1();
     }
 }
Esempio n. 3
0
 public void LoadTutorial()
 {
     SceneManager.LoadScene(0);
     TutorialDoneSaver.SaveTutorialDone("false");
 }