void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.CompareTag("Player")) { //gameObject.GetComponentInChildren<ParticleSystem>().Play(); gameLogic.UpdateText(); audioLogic.PlayCoinSound(); Destroy(gameObject); } }
private void Won() { audioLogic.PlayCoinSound(); winText.enabled = true; Time.timeScale = 0.05f; }