コード例 #1
0
 void checkchain()
 {
     phoneToCheck = tele[chain[0]];
     checking     = true;
     checkcounter = 0;
     flaweless    = true;
     useractive   = true;
 }
コード例 #2
0
 void gotClicked(telescript test)
 {
     if (checking)
     {
         if (checkcounter != 0)
         {
             tele[chain[checkcounter - 1]].clip.Stop();
             tele[chain[checkcounter - 1]].shaking = false;
             tele[chain[checkcounter - 1]].transform.localRotation = Quaternion.Euler(0, 0, 0);
             if (tele[chain[checkcounter - 1]] == test)
             {
                 tele[chain[checkcounter - 1]].activate();
             }
         }
         if (test == phoneToCheck)
         {
             //StartCoroutine(blockUser());
             if (checkcounter == chain.Count - 1)
             {
                 counterText.text = (checkcounter + 1).ToString();
                 checking         = false;
                 useractive       = false;
                 Appendchain();
             }
             else
             {
                 checkcounter++;
                 phoneToCheck = tele[chain[checkcounter]];
             }
         }
         else
         {
             Debug.Log("Wrong Phone!");
             var image     = playgroundCanvas.GetComponent <Image>();
             var tempColor = image.color;
             tempColor.a         = 0.8f;
             image.color         = tempColor;
             playgroundText.text = "Spiel verloren!";
             //StartCoroutine(removeText());
             checking   = false;
             useractive = false;
             gameActive = false;
             newGameButton.interactable = true;
         }
     }
 }