Beispiel #1
0
 private void FixedUpdate()
 {
     if (!CountDown.GetCanStart() || Timer.GetIsGameOver())
     {
         return;
     }
     Move();
 }
Beispiel #2
0
 // Update is called once per frame
 void Update()
 {
     if (!CountDown.GetCanStart() || Timer.GetIsGameOver())
     {
         return;
     }
     Rotate();
 }
Beispiel #3
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (!CountDown.GetCanStart() || Timer.GetIsGameOver())
        {
            return;
        }

        if (/*!isBlinking && */ collision.gameObject.tag == "Enemy")
        {
            Join(collision.gameObject);
        }

        if (collision.gameObject.tag == "BlockObject")
        {
            SoundManager.Instance.PlaySe(SE.HitWall);
            Divide();
            StartCoroutine("Blink");
        }
    }
Beispiel #4
0
    void Update()
    {
        if (!CountDown.GetCanStart() || isGameOver)
        {
            return;
        }

        currentTime -= Time.deltaTime;

        if (!isGameOver && currentTime <= 0)
        {
            SoundManager.Instance.PlaySe(SE.TimeUp);
            isGameOver = true;
            Score.SetScore(playerController.GetfriendsCount() + 1);
            gameOverObj.SetActive(true);
            sendRate rate = FindObjectOfType <sendRate>();
            rate.sendScore(TitleTransition.GetName(), Score.GetScore(), "standard");
        }

        timerText.text = minute.ToString("0") + ":" + ((int)currentTime).ToString("0");
    }