Ejemplo n.º 1
0
 private void Update()
 {
     if (CheckOverLap.DoOverlap(bird.GetCorners(), Utils.GetWorldCorners(rt)) == true)
     {
         scoreManager.AddScore();
         gameObject.SetActive(false);
     }
 }
Ejemplo n.º 2
0
 private void Update()
 {
     if (gameManager.GetCurrentState() == STATEGAME.PLAYING)
     {
         if (CheckOverLap.DoOverlap(bird.GetCorners(), Utils.GetWorldCorners(rt)) == true)
         {
             gameManager.DoGameOver();
         }
     }
 }
Ejemplo n.º 3
0
 void CheckGameOver()
 {
     scoreManager.SetEnableScore(true);
     if (CheckOverLap.DoOverlap(bird.GetCorners(), ground.GetCorners()) == true)
     {
         DoGameOver();
         bird.transform.position = new Vector3(bird.transform.position.x, ground.GetCorners()[1].y + (bird.GetCorners()[1].y - bird.GetCorners()[0].y) / 2, bird.transform.position.z);
         return;
     }
 }