// Update is called once per frame void Update() { if (this.transform.position.y < -5) { GM.GameOver(); } }
// Update is called once per frame void Update() { Audio_tempoatual += Time.deltaTime; if (Audio_tempoatual >= Audio_tempospaw) { PlaySound(); Audio_tempoatual = 0; Audio_tempospaw = Random.Range(8, 12); } if (test [0] != null && test [1] != null && test [2] != null && test [3] != null && test [4] != null && test [5] != null) { print("fim do teste"); StreamWriter writer = new StreamWriter(path, true); writer.WriteLine("Resultado:"); for (int i = 0; i < 6; i++) { writer.WriteLine(test [i]); } //writer.WriteLine (NivelAudicao(resultado)); writer.WriteLine(""); writer.Close(); GM.GameOver(); } }
void OnCollisionEnter(Collision col) { if (col.gameObject.CompareTag("Ground")) { grounded = true; } if (col.gameObject.CompareTag("Coin")) { gameManager.addMoeda(1); Destroy(col.gameObject); //print ("Colide with Coin"); } if (col.gameObject.CompareTag("Enemy")) { gameManager.lostMoeda(moedasPerdidas); Destroy(col.gameObject); //print ("Colide with Enemy"); if (gameManager.getNoite()) { gameManager.GameOver(); } } }