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