Esempio n. 1
0
 private void FixedUpdate()
 {
     if (!CountDown.GetCanStart() || Timer.GetIsGameOver())
     {
         return;
     }
     Move();
 }
Esempio n. 2
0
 // Update is called once per frame
 void Update()
 {
     if (!CountDown.GetCanStart() || Timer.GetIsGameOver())
     {
         return;
     }
     Rotate();
 }
Esempio n. 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");
        }
    }
Esempio n. 4
0
File: Timer.cs Progetto: 0eta0/oasis
    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");
    }