private void Update() { if (CheckOverLap.DoOverlap(bird.GetCorners(), Utils.GetWorldCorners(rt)) == true) { scoreManager.AddScore(); gameObject.SetActive(false); } }
private void Update() { if (gameManager.GetCurrentState() == STATEGAME.PLAYING) { if (CheckOverLap.DoOverlap(bird.GetCorners(), Utils.GetWorldCorners(rt)) == true) { gameManager.DoGameOver(); } } }
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; } }