예제 #1
0
 void SetScoreText()
 {
     scoreText.text = score.ToString();
     if (score == 350)
     {
         fbc.setVisible(true);
         fbc.setState(-1);
     }
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 public void tmp()
 {
     rb.isKinematic     = true;
     isStart            = false;
     player.isKinematic = true;
     fbc.setState(--life);
     if (life != 0)
     {
         StartCoroutine(fbc.GameStart());
     }
     lifeText.text = "" + life.ToString();
 }
예제 #4
0
 void Update()
 {
     if (!fbc.Visible())
     {
         countdownTo -= Time.deltaTime;
         if (countdownTo > 0)
         {
             countdownText.text = "" + (int)countdownTo;
         }
         else
         {
             fbc.setVisible(true);
             fbc.setState(-2);
         }
     }
 }