Beispiel #1
0
 public void GameStart()
 {
     if (isPlaying || isCourutineActive)
     {
         return;
     }
     isCourutineActive = true;
     started           = false;
     labyrinthInstance.GenerateBall(passedSectorsOnStart - 3, ballPrefab);
     StartCoroutine(StartingMove(0f, passedSectorsOnStart * generateDistance - currentDistance - generateDistance / gridHeight - HeightPixelsToUnits(adsPixelSize)));
     score = 0;
     timer = 0;
     if (adTime == adTimer)
     {
         ad = new InterstitialAd("ca-app-pub-5377701829054453/4751160121");
         AdRequest request = new AdRequest.Builder().Build();
         ad.LoadAd(request);
     }
     menuScreen.GetComponent <GraphicRaycaster>().enabled = false;
     endScreen.GetComponent <GraphicRaycaster>().enabled  = false;
     gameCanvas.SetActive(true);
 }