private void FixedUpdate() { if (!CountDown.GetCanStart() || Timer.GetIsGameOver()) { return; } Move(); }
// Update is called once per frame void Update() { if (!CountDown.GetCanStart() || Timer.GetIsGameOver()) { return; } Rotate(); }
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"); } }
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"); }