void SetScoreText() { scoreText.text = score.ToString(); if (score == 350) { fbc.setVisible(true); fbc.setState(-1); } }
void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { other.attachedRigidbody.GetComponent <MeshRenderer>().enabled = false; int x = GameObject.Find("Ball").GetComponent <BallController> ().getLife(); GameObject.Find("Ball").GetComponent <BallController> ().canCollide = false; fbc.setState(--x); } }
public void tmp() { rb.isKinematic = true; isStart = false; player.isKinematic = true; fbc.setState(--life); if (life != 0) { StartCoroutine(fbc.GameStart()); } lifeText.text = "" + life.ToString(); }
void Update() { if (!fbc.Visible()) { countdownTo -= Time.deltaTime; if (countdownTo > 0) { countdownText.text = "" + (int)countdownTo; } else { fbc.setVisible(true); fbc.setState(-2); } } }