예제 #1
0
    void Update()
    {
        if (!fbc.Visible())
        {
            player = GameObject.FindGameObjectWithTag("Player").GetComponent <Rigidbody>();

            if (!isStart)
            {
                rb.isKinematic     = false;
                player.isKinematic = false;
                rb.position        = player.transform.position + new Vector3(0, 0, 1.0f);
            }

            if (Input.GetMouseButtonDown(0))
            {
                rb.AddForce(0, 0, 300f);
                isStart = true;
            }

            if (rb.position.z < 0)
            {
                fbc.setVisible(true);
                tmp();
            }
        }
    }
예제 #2
0
 void SetScoreText()
 {
     scoreText.text = score.ToString();
     if (score == 350)
     {
         fbc.setVisible(true);
         fbc.setState(-1);
     }
 }
예제 #3
0
 void Update()
 {
     if (!fbc.Visible())
     {
         countdownTo -= Time.deltaTime;
         if (countdownTo > 0)
         {
             countdownText.text = "" + (int)countdownTo;
         }
         else
         {
             fbc.setVisible(true);
             fbc.setState(-2);
         }
     }
 }